백준2339 [백준/파이썬] 24198번 Muffinspelet -Coden = int(input())res, cnt = [0, 0], 0while n: cnt += 1 res[cnt % 2] += (n + 1) // 2 n //= 2print(*res) 2024. 7. 8. [백준/파이썬] 27475번 Cancel the Trains -Codefor _ in range(int(input())): n, m = map(int, input().split()) counts = [0] * 101 train1 = list(map(int, input().split())) train2 = list(map(int, input().split())) res = 0 for el in train2: if el in train1: res += 1 print(res) 2024. 7. 7. [백준/파이썬] 26548번 Quadratics -Codefrom math import sqrtfor _ in range(int(input())): a, b, c = map(float, input().split()) res1 = (-b + sqrt(b ** 2 - 4 * a * c)) / (2 * a) res2 = (-b - sqrt(b ** 2 - 4 * a * c)) / (2 * a) print(f"{res1:.3f}, {res2:.3f}") 2024. 7. 6. [백준/파이썬] 22277번 Non-Integer Donuts -Codedef convert(s): return int("".join(s.split("."))[1:])n = int(input())now = convert(input())res = 0for _ in range(n): input_money = convert(input()) now += input_money if now % 100: res += 1print(res) 2024. 7. 5. [백준/파이썬] 26392번 Desni klik -Coden, r, s = map(int, input().split())for _ in range(n): max_val, min_val = 0, 1e9 for i in range(r): line = input() if "#" in line: val = r - i max_val = max(max_val, val) min_val = min(max_val, val) print(max_val - min_val) 2024. 7. 4. [백준/파이썬] 26550번 Ornaments -Codefor _ in range(int(input())): n = int(input()) arr = [0] for i in range(1, n + 1): arr.append(arr[-1] + i) print(sum(arr)) 2024. 7. 3. 이전 1 ··· 32 33 34 35 36 37 38 ··· 390 다음