목록Python Algorithm (133)
cool hamsters never sleep
백준 2884. 알람 시계
H, M = map(int, input().split()) #45분 이상이면 오류 발생하지 않으므로 if M > 44 : print(H, M-45) #45분 미만이면 시간이 바뀌므로 elif H > 0 and M < 45 : print(H-1, M+15) #0시 45분 미만이면 -1의 오류가 발생하므로 else : print(23, M+15)
Python Algorithm
2022. 7. 15. 09:37
백준 14681. 사분면 고르기
x = int(input()) y = int(input()) -1000 0 : print(2) else : print(3)
Python Algorithm
2022. 7. 15. 09:33
백준 2753. 윤년
year = int(input()) 1
Python Algorithm
2022. 7. 15. 09:32
백준 9498. 시험 성적
sco = int(input()) if sco >= 90 : print("A") elif sco >= 80 : print("B") elif sco >= 70 : print("C") elif sco >= 60 : print("D") else : print("F") 1. 백준 알고리즘 사이트에서 런타임 에러 (NameError)로 뜰 때 참조변수가 없을 경우 발생 앞에는 A라고 하고, 뒤에서는 a라고 하지 않았는지 확인
Python Algorithm
2022. 7. 15. 09:31
백준 1330. 두 수 비교하기
A, B = map(int, input().split()) -10000
Python Algorithm
2022. 7. 15. 09:29