알고리즘/백준 알고리즘
[백준] 1330. 두 수 비교하기, 2739. 구구단, 2753. 윤년 구하기, 2884. 알람 시계, 8383. 합[백준] 1330. 두 수 비교하기, 2739. 구구단, 2753. 윤년 구하기, 2884. 알람 시계, 8383. 합
황성안
2021. 4. 12. 02:00
728x90
반응형
1 2 3 4 5 6 7 8 9 10 | A, B = list(map(int,input().split())) if A > B: print(">") elif A < B: print("<") elif A == B: print("==") else: print("숫자를 입력해 주십시요.") | cs |
1 2 3 | N = int(input()) for i in range(1,10): print("{} * {} = {}".format(N,i,N*i)) | cs |
1 2 3 4 5 | A = int(input()) if A%4 == 0 and (A%100 != 0 or A%400 == 0): print("1") else: print("0") | cs |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | H, M= list(map(int,input().split())) if 0 <= H <= 23 and 0 <= M <= 59: if M >= 45: result_H = H result_M =M-45 elif H != 0 and M < 45: result_H = H - 1 result_M = (M+60) - 45 elif H == 0 and M < 45: result_H = 23 result_M = (M + 60) - 45 print(result_H,result_M) | cs |
1 2 3 4 5 | T = int(input()) temp = 0 for tc in range(1,T+1): temp += tc print(temp) | cs |
728x90
반응형