Programming [Python] (411) 썸네일형 리스트형 #34 백준 파이썬 [1152] 단어의 개수 #34 백준[1152] 단어의 개수 https://www.acmicpc.net/submit/1152 #Solution sentence_list = [] sentence_list = list(map(str, input().split())) print(len(sentence_list)) #33 백준 파이썬 [1065] 한 수 #33 백준[1065] 한 수 https://www.acmicpc.net/problem/1065 #Solution input_num = int(input()) all_numbers = [] for k in range(1, input_num+1): if 0 < k < 100: all_numbers.append(k) elif 100 #32 백준 파이썬 [4673] 셀프 넘버 #32 백준[4673] 셀프 넘버 https://www.acmicpc.net/problem/4673 #Solution def d(n): a = 0 for x in list(str(n)): a = a + int(x) return int(n) + a a= [] for i in range(1,10001): k = d(i) a.append(k) for b in range(1, 10001): if b in a: pass else: print(b) #31 백준 파이썬 [1110] 더하기 사이클 #31 백준[1110] 더하기 사이클 https://www.acmicpc.net/problem/1110 #Solution #먼저 함수를 만들어보자 def howplus(num): if num < 10: num_str = str(num) num_list = list([0,num_str]) num2 = int(num_list[0]) + int(num_list[-1]) num2_str = str(num2) num2_list = list(num2_str) num2_final = int(num_list[-1])*10 + int(num2_list[-1]) return num2_final else: num_str = str(num) num_list = list(num_str) num2 = int(num_list[0].. #30 백준 파이썬 [4344] 평균은 넘겠지 #30 백준[4344] 평균은 넘겠지 https://www.acmicpc.net/problem/4344 #Solution case_num = int(input()) answer = [] for k in range(case_num): line = list(map(int, input().split())) line_avg = sum(line[1:]) / line[0] upper_list=[] for i in line[1:]: if i > line_avg: upper_list.append(i) answer.append("%0.3f"%round(len(upper_list)/line[0]*100 , 3)) for i in answer: print("%s%%"%i) #29 백준 파이썬 [1546] 평균 #29 백준[1546] 평균 https://www.acmicpc.net/problem/1546 #Solution a = int(input()) b = list(map(int, input().split())) c=0 new_point=[] for i in b: c += i avg_old = c/a for i in b: new_point.append(i/max(b) * 100) print("%0.2f" % (sum(new_point)/a)) #28 백준 파이썬 [10871] X보다 작은 수 #28 백준[10871] X보다 작은 수 https://www.acmicpc.net/submit/10871 #Solutiona1, a2 = map(int, input().split()) b = list(map(int, input().split())) for i in b: if i < a2: print(i, end=" ") #27 백준 파이썬 [10817] 세 수 #27 백준[10817] 세 수 https://www.acmicpc.net/problem/10817 #Solutiona = list(map(int, input().split())) b=sorted(a) print(b[1]) 이전 1 ··· 45 46 47 48 49 50 51 52 다음