백준2362 [백준/파이썬] 12250번 New Lottery Game (Small) -Code for t in range(int(input())): a, b, k = map(int, input().split()) res = 0 for i in range(a): for j in range(b): if i & j < k: res += 1 print(f"Case #{t + 1}: {res}") 2024. 3. 2. [백준/파이썬] 31450번 Everyone is a winner -Code m, k = map(int, input().split()) print("Yes" if m % k == 0 else "No") 2024. 3. 1. [백준/파이썬] 30821번 별자리가 될 수 있다면 -Code from math import factorial n = int(input()) if n < 5: print(0) exit() print(factorial(n) // (factorial(5) * factorial(n - 5))) 2024. 2. 29. [백준/파이썬] 7279번 Autobusas -Code n, k = map(int, input().split()) total, max_stand = 0, 0 for _ in range(n): a, b = map(int, input().split()) total += a - b if total > k: max_stand = max(max_stand, total - k) print(max_stand) 2024. 2. 28. [백준/파이썬] 8826번 Spacer -Code for _ in range(int(input())): n = input() direction = input() print( abs(direction.count('W') - direction.count('E')) + abs(direction.count('N') - direction.count('S')) ) 2024. 2. 27. [백준/파이썬] 21200번 Forced Choice -Code n, p, s = map(int, input().split()) for _ in range(s): nums = list(map(int, input().split())) if p in nums[1:]: print("KEEP") else: print("REMOVE") 2024. 2. 26. 이전 1 ··· 57 58 59 60 61 62 63 ··· 394 다음