파이썬2187 [백준/파이썬] 32585번 Building Pyramids -Codearr = [0]for i in range(1, int(input()) + 1): arr.append(arr[i - 1] + i)print(sum(arr)) 2024. 10. 29. [백준/파이썬] 8387번 Dyslexia -Coden = int(input())text1, text2 = input(), input()res = 0for i in range(n): if text1[i] == text2[i]: res += 1print(res) 2024. 10. 28. [백준/파이썬] 12571번 Rope Intranet (Small) -Codefor i in range(1, int(input()) + 1): n = int(input()) if n == 1: input() print(f"Case #{i}: 0") continue a1, b1 = map(int, input().split()) a2, b2 = map(int, input().split()) print(f"Case #{i}:", end=" ") print( 1 if (a1 > a2 and b1 b2) else 0 ) 2024. 10. 27. [백준/파이썬] 22421번 Koto Municipal Subway -Codefrom math import sqrtwhile True: res = 100000 d, e = map(int, input().split()) if d == e == 0: break for i in range(d): now_price = abs(sqrt(i ** 2 + (d - i) ** 2) - e) res = min(res, now_price) print(f"{res:.4f}") 2024. 10. 26. [백준/파이썬] 9971번 The Hardest Problem Ever -Codealpa = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"res = []while True: line1 = input() if line1 == "ENDOFINPUT": break decode = "" s = input().strip() for w in s: if w not in alpa: decode += w continue decode += alpa[(alpa.find(w) - 5) % 26] input() print(decode) 2024. 10. 25. [백준/파이썬] 22341번 사각형 면적 -Coden, c = map(int, input().split())h, w = n, nfor _ in range(c): x, y = map(int, input().split()) if x >= w or y >= h: continue if h * x >= w * y: w = x else: h = yprint(h * w) 2024. 10. 24. 이전 1 ··· 15 16 17 18 19 20 21 ··· 365 다음