본문 바로가기

백준2353

[백준/파이썬] 29267번 Случай с игрой -Coden, k = map(int, input().split())bullet = 0save_bullet = 0for _ in range(n): s = input() if s == "save": save_bullet = bullet elif s == "load": bullet = save_bullet elif s == "shoot": bullet -= 1 else: bullet += k print(bullet) 2024. 5. 11.
[백준/파이썬] 31789번 모험의 시작 -Coden = int(input())x, s = map(int, input().split())res = 0for _ in range(n): c, p = map(int, input().split()) if x >= c: res = max(res, p)print("YES" if res > s else "NO") 2024. 5. 10.
[백준/파이썬] 11258번 Thai Lottery Checking -Codelotto = [list(input().split()) for _ in range(6)]while True: num = input() if num == "-1": break res = 0 if num == lotto[0][0]: res += int(lotto[0][1]) if num[:3] == lotto[1][0]: res += int(lotto[1][1]) elif num[:3] == lotto[2][0]: res += int(lotto[2][1]) if num[3:] == lotto[3][0]: res += int(lotto[3][1]) elif num[3:] == lotto[4][0].. 2024. 5. 9.
[백준/파이썬] 30272번 Atsitiktinių skaičių generatorius -Codearr = [ ['..#####..', '.##...##.', '##.....##', '##.....##', '##.....##', '.##...##.', '..#####..', '.........'], ['....##...', '..####...', '....##...', '....##...', '....##...', '....##...', '..######.', '.........'], ['.#######.', '##.....##', '.......##', '.#######.', '##.......', '##.......', '#########', '.........'], ['.#######.', '##.....##', '.......##', '.#######.', '... 2024. 5. 8.
[백준/파이썬] 31798번 단원평가 -Codefrom math import sqrtnums = list(map(int, input().split()))a, b = sorted(nums[:2])c = nums[2]print(c ** 2 - b if a == 0 else int(sqrt(a + b))) 2024. 5. 7.
[백준/파이썬] 7218번 Pasislėpę romėniški skaičiai -Coderome_num = { "I": 1, "II": 2, "III": 3, "IV": 4, "V": 5, "VI": 6, "VII": 7, "VIII": 8, "IX": 9, "X": 10, "XI": 11, "XII": 12}n = int(input())s = input()res = []for num in rome_num: if num in s: res.append(rome_num[num])print(*res) 2024. 5. 6.