본문 바로가기

백준2363

[백준/파이썬] 13496번 The Merchant of Venice -Code for t in range(1, int(input()) + 1): n, s, d = map(int, input().split()) res = 0 for _ in range(n): d_i, v_i = map(int, input().split()) if s * d >= d_i: res += v_i print(f"Data Set {t}:") print(res) print() 2024. 2. 16.
[백준/파이썬] 25206번 너의 평점은 -Code rating_list = {"A+": 4.5, "A0": 4.0, "B+": 3.5, "B0": 3.0, "C+": 2.5, "C0": 2.0, "D+": 1.5, "D0": 1.0, "F": 0} res_score, res_cnt = 0, 0 for _ in range(20): subject, grade, rating = input().split() if rating == "P": continue res_score += float(grade) * rating_list[rating] res_cnt += float(grade) print(round(res_score / res_cnt, 6)) 2024. 2. 15.
[백준/파이썬] 18198번 Basketball One-on-One -Code a, b = 0, 0 line = input() for i in range(0, len(line), 2): if line[i] == "A": a += int(line[i + 1]) else: b += int(line[i + 1]) print("A" if a > b else "B") 2024. 2. 14.
[백준/파이썬] 29683번 Рождественская лотерея -Code n, a = map(int, input().split()) res = 0 for num in list(map(int, input().split())): res += num // a print(res) 2024. 2. 13.
[백준/파이썬] 30319번  Advance to Taoyuan Regional -Code from datetime import datetime input_date = datetime.strptime(input(), "%Y-%m-%d") target_date = datetime.strptime("2023-10-21", "%Y-%m-%d") diff_date = target_date - input_date if int(diff_date.days) >= 35: print("GOOD") else: print("TOO LATE") 2024. 2. 12.
[백준/파이썬] 26566번  Pizza -Code from math import pi for _ in range(int(input())): a, p1 = map(int, input().split()) r, p2 = map(int, input().split()) if a / p1 > pi * r ** 2 / p2: print("Slice of pizza") else: print("Whole pizza") 2024. 2. 11.