파이썬2193 [백준/파이썬] 30143번 Cookie Piles -Codefor _ in range(int(input())): n, a, d = map(int, input().split()) res = [a] for i in range(n - 1): res.append(res[-1] + d) print(sum(res)) 2024. 7. 23. [백준/파이썬] 4758번 Filling Out the Team -Codewhile True: s, w, p = map(float, input().split()) if s == w == p: break res = [] if s = 150 and p >= 200: res.append("Wide Receiver") if s = 300 and p >= 500: res.append("Lineman") if s = 200 and p >= 300: res.append("Quarterback") if len(res) == 0: res.append("No positions") print(*res) 2024. 7. 22. [백준/파이썬] 29534번 Буквы и весы -Coden = int(input())s = input()if len(s) > n: print("Impossible")else: res = 0 for w in s: res += ord(w) - ord('a') + 1 print(res) 2024. 7. 21. [백준/파이썬] 25849번 Briefcases Full of Money -Codemoney = [1, 5, 10, 20, 50, 100]max_money = 0bag = list(map(int, input().split()))res = 0for i in range(6): total = money[i] * bag[i] if total >= max_money: max_money = total res = money[i]print(res) 2024. 7. 20. [백준/파이썬] 32089번 部員の変遷 -Codewhile True: n = int(input()) if n == 0: break a_list = list(map(int, input().split())) res = 0 for i in range(n - 2): res = max(res, sum(a_list[i:i + 3])) print(res) 2024. 7. 19. [백준/파이썬] 6500번 랜덤 숫자 만들기 -Codewhile True: a = int(input()) if a == 0: break res = [a] while True: a = str(a ** 2) a = int(('0' * (8 - len(a)) + a)[2:-2]) if a in res: break res.append(a) print(len(res)) 2024. 7. 18. 이전 1 ··· 32 33 34 35 36 37 38 ··· 366 다음