๐Ÿคฏ ๋ฌธ์ œํ’€์ด

https://www.acmicpc.net/problem/23246n = int(input())arr = []rank = []for _ in range(n): score = list(map(int, input().split())) m = score[1] * score[2] * score[3] s = sum(score[1:]) n = score[0] arr.append([m, s, n])rank = sorted(arr)for i in range(3): print(rank[i][2], end = ' ') ์ƒ๊ฐ์ฒซ ๋ฒˆ์งธ ๋ฐฐ์—ด ์นธ์—๋Š” ๊ณฑ, ๋‘ ๋ฒˆ์งธ ๋ฐฐ์—ด ์นธ์—๋Š” ํ•ฉ, ์„ธ ๋ฒˆ์งธ ๋ฐฐ์—ด ์นธ์—๋Š” ๋“ฑ๋ฒˆํ˜ธ๋ฅผ ๋„ฃ์–ด์ฃผ๊ณ  ์ •๋ ฌํ•˜๋ฉด ๋˜๋Š” ๋ฌธ์ œ
https://www.acmicpc.net/problem/11650n = int(input())arr = []for _ in range(n): nums = list(map(int, input().split())) arr.append(nums)arr.sort()for num in arr: print(num[0], num[1]) ์ƒ๊ฐ์˜ค๋ฆ„์ฐจ์ˆœ ์ •๋ ฌ๋งŒ ํ•˜๋ฉด ๋˜๋Š” ๊ฐ„๋‹จํ•œ ๋ฌธ์ œ
https://www.acmicpc.net/problem/10974n = int(input())arr = [i for i in range(1, n + 1)]check = [False] * nchoose = []def permutation(level): if level == n: print(*choose) return for i in range(n): if check[i] == True: continue choose.append(arr[i]) check[i] = True permutation(level + 1) check[i] = False choose.pop()permutation(0) ์ƒ๊ฐ์ œ๋ชฉ ๊ทธ๋Œ€๋กœ ์ˆœ์—ด ๋ฌธ์ œ, ์กฐํ•ฉ๊ณผ ๋น„์Šทํ•œ ๋ฐฉ์‹์œผ๋กœ ํ’€๋ฉด ๋œ..
https://www.acmicpc.net/problem/1759l, c = map(int, input().split())arr = list(map(str, input().split()))arr.sort()choose = []check = ['a', 'e', 'i', 'o', 'u']def combination(index, level): if level == l: cnt, cnt2 = 0, 0 for ch in choose: if ch in check: cnt += 1 else: cnt2 += 1 if cnt >= 1 and cnt2 >= 2: print(''.join(choose)) return for i in range(..
https://www.acmicpc.net/problem/6603n = 0choose = []def combination(lst, index, level): if level == 6: print(*choose) return for i in range(index, n): choose.append(lst[i]) combination(lst, i + 1, level + 1) choose.pop()while True: t = list(map(int, input().split())) if t[0] == 0: break n = t[0] arr = t[1:] combination(arr, 0, 0) choose.clear() print() ์ƒ๊ฐ๋Œ€์ถฉ k๊ฐœ์˜ ์ˆซ์ž ์ค‘์—..
https://www.acmicpc.net/problem/4779์žฌ๊ท€ ํ•จ์ˆ˜def cantor(n): if n == 1: return '-' return cantor(n // 3) + ' ' * (n // 3) + cantor(n // 3)while True: try: n = int(input()) print(cantor(3 ** n)) except: break Bottom Updef cantor(n): arr = [''] * (3 ** n) arr[0] = '-' for i in range(1, n + 1): arr[i] = arr[i - 1] + ' ' * 3 ** (i - 1) + arr[i - 1] print(arr[n])while True: try: ..
https://www.acmicpc.net/problem/10870def fibonacci(n): if n == 0 or n == 1: return n return fibonacci(n - 1) + fibonacci(n - 2)n = int(input())print(fibonacci(n))
openmpy
'๐Ÿคฏ ๋ฌธ์ œํ’€์ด' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๊ธ€ ๋ชฉ๋ก