파이썬2245 [백준/파이썬] 22123번 Экзамен -Codefor _ in range(int(input())): s, f, m = input().split() s_h, s_m, s_s = map(int, s.split(":")) f_h, f_m, f_s = map(int, f.split(":")) m = int(m) * 60 s_total = s_h * 3600 + s_m * 60 + s_s f_total = f_h * 3600 + f_m * 60 + f_s test_time = f_total - s_total if test_time = m: print("Perfect") elif test_time + 3600 >= m: print("Test") else: pri.. 2025. 4. 8. [백준/파이썬] 9806번 The King -Coden = int(input())k = int(input())li = list(map(int, input().split()))li_res = [el ** k for el in li]total = 0for el in li_res: if el > 0: total += elprint(total) 2025. 4. 7. [백준/파이썬] 32449번 Animal Farm -Coden = int(input())others = []max_pig = 0for _ in range(n): s, i = input().split() i = int(i) if s == "pig": max_pig = max(max_pig, i) else: others.append(i)res = max_pigfor i in others: if i 2025. 4. 6. [백준/파이썬] 25786번 Decimal XOR -Coden1 = input()n2 = input()n1_l, n2_l = len(n1), len(n2)if n2_l > n1_l: n1 = (n2_l - n1_l) * '0' + n1else: n2 = (n1_l - n2_l) * '0' + n2res = ""for i in range(max(n1_l, n2_l)): n1_i, n2_i = int(n1[i]), int(n2[i]) if n1_i = 7 and n2_i >= 7: res += "0" continue res += "9"print(res) 2025. 4. 5. [백준/파이썬] 33753번 주차 요금 정산하기 -Codefrom math import ceila, b, c = map(int, input().split())t = int(input())res = a if t > 0 else 0t = max(0, t - 30)res += ceil(t / b) * cprint(res) 2025. 4. 4. [백준/파이썬] 30527번 Cornhusker -Codeal = list(map(int, input().split()))n, kwf = map(int, input().split())total = 0for i in range(0, 10, 2): total += al[i] * al[i + 1]res = total // 5 * n // kwfprint(res) 2025. 4. 3. 이전 1 2 3 4 ··· 375 다음