전체 글3040 [백준/파이썬] 28598번 Пилтовер и Заун -Codex1, x2, n = map(int, input().split())# x1 - x2 -> 2 * (a_1....a_i)diff = x1 - x2# 변환값 구하기total = diff // 2# a_i는 전부 1이상 그래서 최소 총합은 n# 따라서 위 조건이 안된다면 false# diff % 2 == 0은 2배여야 같은 값이 증감되는 것을 보장print("YES" if total >= n and diff % 2 == 0 else "NO") 2025. 4. 17. [백준/파이썬] 24302번 КУРИЕРИ -Codedef solution(d): km = d // 1000 if km 2025. 4. 16. [백준/파이썬] 29666번 Блокировка телефона -Codeok = ["123", "456", "789", "147", "258", "369", "058"]s = "".join(sorted(input()))print("Unlocked" if s in ok else "Locked") 2025. 4. 15. [백준/파이썬] 29991번 Fatigue-Fighting Vacation -Codefrom sys import stdininput = stdin.readlined, c, r = map(int, input().split())c_list = [int(input()) for _ in range(c)]r_list = [int(input()) for _ in range(r)]d += sum(r_list)res = ridx = 0for cost in c_list: if d >= cost: d -= cost res += 1 else: breakprint(res) 2025. 4. 14. [백준/파이썬] 27251번 Звездочки -Codefor i in range(1, int(input()) + 1): if i 2025. 4. 13. [백준/파이썬] 29667번 Ответный матч -Codea1, b1 = map(int, input().split(":"))b2, a2 = map(int, input().split(":"))print("YES" if a1 >= b2 and b1 >= a2 else "NO") 2025. 4. 12. 이전 1 2 3 4 ··· 507 다음