백준2339 [백준/파이썬] 32025번 체육은 수학과목 입니다 -Codeh = int(input())w = int(input())print(int(min(h, w) / 2 * 100)) 2024. 7. 14. [백준/파이썬] 27325번 3 つの箱 (Three Boxes) -Coden = int(input())s = input()ball = 1res = 0for el in s: if el == 'L': ball -= 1 if ball > 1 else 0 else: ball += 1 if ball = 3: res += 1print(res) 2024. 7. 13. [백준/파이썬] 12085번 Moist (Small1) -Codefor t in range(1, int(input()) + 1): n = int(input()) names = [input() for _ in range(n)] res, now = 0, names[0] for i in range(1, n): if now > names[i]: res += 1 continue now = names[i] print(f"Case #{t}: {res}") 2024. 7. 12. [백준/파이썬] 14969번 Taro's Shopping -Codewhile True: n, m = map(int, input().split()) if n == m == 0: break price = list(map(int, input().split())) res = -1 for i in range(n - 1): for j in range(i + 1, n): sum_price = price[i] + price[j] if sum_price 2024. 7. 11. [백준/파이썬] 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. 이전 1 ··· 31 32 33 34 35 36 37 ··· 390 다음