파이썬2188 [백준/파이썬] 32278번 선택 가능성이 가장 높은 자료형 -Codedef solution(n): if -32768 2024. 9. 23. [백준/파이썬] 32297번 문자열을 만들어요 -Coden = int(input())s = input()print("YES" if 'gori' in s.lower() else "NO") 2024. 9. 22. [백준/파이썬] 32326번 Conveyor Belt Sushi -Codeprint(int(input()) * 3 + int(input()) * 4 + int(input()) * 5) 2024. 9. 21. [백준/파이썬] 19813번 Dates -Codefor _ in range(int(input())): line = input() if '.' in line: d, m, y = map(int, line.split('.')) print(f"{d:02}.{m:02}.{y:04} {m:02}/{d:02}/{y:04}") else: m, d, y = map(int, line.split('/')) print(f"{d:02}.{m:02}.{y:04} {m:02}/{d:02}/{y:04}") 2024. 9. 20. [백준/파이썬] 10410번 Eligibility -Codefor _ in range(int(input())): a, b, c, d = input().split() b = int(b.split('/')[0]) c = int(c.split('/')[0]) print(a, end=" ") if b >= 2010 or c >= 1991: print("eligible") elif int(d) >= 41: print("ineligible") else: print("coach petitions") 2024. 9. 19. [백준/파이썬] 20216번 Ducky Debugging -Codefrom sys import stdin, stdoutwhile True: line = stdin.readline().rstrip() if line == "I quacked the code!": break try: print("*Nod*" if line[-1] == "." else "Quack!") except: pass stdout.flush()시간 초과가 계속 떠서 찾아보니 stdout.flush를 사용하니 해결되었습니다. ✔️ sys.stdout.flush()출력 버퍼 비우기로 해당 지점까지 출력 버퍼에 버퍼링된 모든 데이터를 파일 객체에 푸시합니다.출력 함수(print 등)를 통해 데이터를 출력하는 경우 데이터의 내용이 즉시 .. 2024. 9. 18. 이전 1 ··· 21 22 23 24 25 26 27 ··· 365 다음