목록Algorithm (38)
선릉역 1번 출구
1. 1712 A, B, C = map(int, input().split()) i = 1 if B >= C: print(-1) else: print(A // (C - B) + 1) 2. 2292 num = int(input()) count = 2 start = 7 while True: if num == 1: count = 1 print(1) break if num/start nums_bee: nums_bee += 6 * count count += 1 print(count) 3. 1193 num = int(input()) cnt = 1 fract = 1 flag = 1 prev = 0 while num > fract: prev = fract fract += (cnt + 1) cnt += 1 flag = -..
1. 11654 print(ord(input())) 2. 11720 a = int(input()) b = input() sum = 0 for i in range(a): sum += int(b[i]) print(sum) a = int(input()) b = input() print(sum([int(i) for i in b])) 3. 10809 ls = [-1] * 26 word = input() for i in range(len(word)): if ls[ord(word[i])-97] == -1: ls[ord(word[i])-97] = i for i in range(26): print("{} ".format(ls[i]), end="") // print(f'{a[i]} ',end='') 4. 2675 for ..
1. 15596 def solve(a:list) -> int: return sum(a) 2. 4673 def selfnum(): a = [0]*10001 for j in range(1,10001): if(a[j] == 0): //self_num인지 check! print(j) //먼저 self_num 숫자 출력 self_num = j while self_num
1. 10818 num = int(input()) ls = list(map(int, input().split())) max = ls[0] min = ls[0] for i in range(1, num): if max ls[i]: min = ls[i] print(min,max) 2. 2562 ls = int(input()) max = ls index_max = 1 for i in range(2, 10): a = int(input()) if max
1. 10952 a, b = map(int, input().split()) while a !=0 and b !=0: print(a+b) a, b = map(int, input().split()) 2. 10951 while True: try: a, b = map(int, input().split()) print(a+b) except: break #테스트 케이스의 개수가 정해져 있지 않아 에러가 발생할 때를 대비해서 try~ except문을 사용해줌 3. 1110 sum = 1 num = int(input()) same = num if num >= 10: same = (same % 10) * 10 + (int(same / 10) + (same % 10)) % 10 else: same = same * 10 +..
1. 2739 a = int(input()) for i in range(1,10): print(a,"*",i,"=",a*i) 2. 10950 a = int(input()) for i in range(a): b, c = map(int, input().split()) print(b+c) 3. 8393 a = int(input()) sum = 0 for i in range(1,a+1): sum += i print(sum) 4. 15552 import sys a = int(input()) for i in range(a): b, c = map(int, sys.stdin.readline().split()) print(b + c) #반복문으로 여러 줄을 입력받는 상황에서는 sys.stdin.readline()을 써주..