파이썬2193 [백준/파이썬] 13063번 Lobby -Codewhile True: n, m, k = map(int, input().split()) if n == m == k == 0: break other = n - m - k half = n // 2 + 1 if half - m > other: print(-1) else: print(max(half - m, 0)) 2024. 7. 17. [백준/파이썬] 30314번 Just a Joystick -Coden = int(input())line1 = input()line2 = input()res = 0for i in range(n): distance = abs(ord(line1[i]) - ord(line2[i])) res += min(distance, 26 - distance)print(res) 2024. 7. 16. [백준/파이썬] 32046번 Snacks within 300 Yen -Codewhile True: n = int(input()) if n == 0: break res = 0 snacks = list(map(int, input().split())) for p in snacks: if res + p 2024. 7. 15. [백준/파이썬] 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. 이전 1 ··· 33 34 35 36 37 38 39 ··· 366 다음