백준2347 [백준/파이썬] 27194번 Meeting Near the Fountain -Codefrom math import ceiln, t = map(int, input().split())m = int(input())x, y = map(int, input().split())out_time = m / (60 * x)in_time = (n - m) / (60 * y)res = max(out_time + in_time - t, 0)print(ceil(res)) 2024. 7. 10. [백준/파이썬] 26122번 가장 긴 막대 자석 -Coden = int(input())s = input()arr, cnt = [0], 1for i in range(1, len(s)): if s[i - 1] == s[i]: cnt += 1 else: arr.append(cnt) cnt = 1arr.append(cnt)res = 0for i in range(1, len(arr)): res = max(res, min(arr[i - 1], arr[i]))print(res * 2) 2024. 7. 9. [백준/파이썬] 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. 이전 1 ··· 33 34 35 36 37 38 39 ··· 392 다음