파이썬2188 [백준/파이썬] 32369번 양파 실험 -Coden, a, b = map(int, input().split())praise, blame = 1, 1for _ in range(n): praise += a blame += b if praise 2024. 9. 29. [백준/파이썬] 14683번 Exactly Electrical -Codea, b = map(int, input().split())c, d = map(int, input().split())t = int(input())res = t - abs(a - c) - abs(b - d)print("Y" if res >= 0 and res % 2 == 0 else "N") 2024. 9. 28. [백준/파이썬] 32216번 찬물 샤워 -Coden, k, t0 = map(int, input().split())d_list = list(map(int, input().split()))t, res = t0, 0for d in d_list: if t k: t = t + d - abs(t - k) else: t = t + d res += abs(t - k)print(res) 2024. 9. 27. [백준/파이썬] 32246번 빙고 막기 -Coden = int(input())print(n if n != 2 else 3) 2024. 9. 26. [백준/파이썬] 3533번 Explicit Formula -Codefrom itertools import combinationsnums = list(map(int, input().split()))two = [i|j for i, j in combinations(nums, 2)]three = [i|j|k for i, j, k in combinations(nums, 3)]res = 0for el in two: res ^= elfor el in three: res ^= elprint(res) 2024. 9. 25. [백준/파이썬] 32342번 와우와 쿼리 -Codefor _ in range(int(input())): s = input() res = 0 for i in range(len(s) - 2): if s[i:i+3] == "WOW": res += 1 print(res) 2024. 9. 24. 이전 1 ··· 20 21 22 23 24 25 26 ··· 365 다음