백준 3052 파이썬 나머지
1) input을 받고, 2) 42로 나눈 나머지를 구하고, > %42 3) list 안에 넣고, > append() 4) set()를 이용해 중복요소를 제거하고, > set() 5) 안에 몇 개 있는지 세어본다 > len() #list 생성 a = [] #input 받고, %42, list 안에 넣음 for i in range(10): a.append(int(input())%42) #set로 중복요소 제거 후 개수 세기 print(len(set(a))) list 안에서 모든 걸 해결할 수도 있다 a = [int(input())%42 for i in range(10)] print(len(set(a)))