numList = []
for i in range(10):
    num = int(input())
    numList.append(num%42)
numList=list(set(numList))
print(len(numList))

 

 

 

문제: https://www.acmicpc.net/problem/3052

 

3052번: 나머지

각 수를 42로 나눈 나머지는 39, 40, 41, 0, 1, 2, 40, 41, 0, 1이다. 서로 다른 값은 6개가 있다.

www.acmicpc.net

'Baekjoon > python' 카테고리의 다른 글

[백준 8958번] OX퀴즈  (0) 2023.01.12
[백준 1546번] 평균  (0) 2023.01.12
[백준 5597번] 과제 안 내신 분..?  (0) 2023.01.11
[백준 2562번] 최댓값  (0) 2023.01.11
[백준 10818번] 최소, 최대  (0) 2023.01.01

+ Recent posts