백준2312 [백준/파이썬] 24303번 ПРЪЧКИ -Codeline = list(map(int, input().split()))rods = sorted([[line[i], line[i + 3]] for i in range(3)], key=lambda x: x[0], reverse=True)l, total, res = line[6], 0, 0while l > total and rods[0][1] + rods[1][1] + rods[2][1] > 0: for i in range(3): if rods[i][1] > 0: total += rods[i][0] rods[i][1] -= 1 res += 1 breakprint(res if total.. 2024. 11. 8. [백준/파이썬] 28640번 Домино -Codedomino1 = list(input().split("|"))domino2 = list(input().split("|"))for domino in domino1: if domino in domino2: print("Yes") exit()print("No") 2024. 11. 7. [백준/파이썬] 32401번 ANA는 회문이야 -Coden = int(input())s = input()n_cnt, res = 0, 0for i in range(n): if s[i] == "A": for j in range(i + 1, n): if s[j] == "A": if n_cnt == 1: res += 1 break elif s[j] == "N": n_cnt += 1 n_cnt = 0print(res) 2024. 11. 6. [백준/파이썬] 26594번 ZOAC 5 -Codes = input()print(s.count(s[0])) 2024. 11. 5. [백준/파이썬] 32515번 BB84 -Coden = int(input())lines = [input() for _ in range(4)]res = ""for i in range(n): if lines[0][i] == lines[2][i]: if lines[1][i] == lines[3][i]: res += lines[1][i] else: print("htg!") exit()print(res) 2024. 11. 4. [백준/파이썬] 32327번 Dusa And The Yobis -Coderes = int(input())while True: try: d = int(input()) if d >= res: break res += d except EOFError: breakprint(res) 2024. 11. 3. 이전 1 ··· 7 8 9 10 11 12 13 ··· 386 다음