시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 3027 2080 1890 72.776%

문제

두 자연수 A와 B가 있을 때, A%B는 A를 B로 나눈 나머지 이다. 예를 들어, 7, 14, 27, 38을 3으로 나눈 나머지는 1, 2, 0, 2이다. 

수 10개를 입력받은 뒤, 이를 42로 나눈 나머지를 구한다. 그 다음 서로 다른 값이 몇 개 있는지 출력하는 프로그램을 작성하시오.

입력

첫째 줄부터 열번째 줄 까지 숫자가 한 줄에 하나씩 주어진다. 이 숫자는 1,000보다 작거나 같고, 음이 아닌 정수이다.

출력

첫째 줄에, 42로 나누었을 때, 서로 다른 나머지가 몇 개 있는지 출력한다.

예제 입력 1

39
40
41
42
43
44
82
83
84
85

예제 출력 1

6

힌트

39, 40, 41, 42, 43, 44, 82, 83, 84, 85를 42로 나눈 나머지는 39, 40, 41, 0, 1, 2, 40, 41, 0, 1이다. 서로 다른 값은 모두 6개가 있다.

W3sicHJvYmxlbV9pZCI6IjMwNTIiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWIwOThcdWJhMzhcdWM5YzAiLCJkZXNjcmlwdGlvbiI6IjxwPlx1YjQ1MCBcdWM3OTBcdWM1ZjBcdWMyMTggQVx1YzY0MCBCXHVhYzAwIFx1Yzc4OFx1Yzc0NCBcdWI1NGMsIEElQlx1YjI5NCBBXHViOTdjIEJcdWI4NWMgXHViMDk4XHViMjA4IFx1YjA5OFx1YmEzOFx1YzljMCBcdWM3NzRcdWIyZTQuIFx1YzYwOFx1Yjk3YyBcdWI0ZTRcdWM1YjQsIDcsIDE0LCAyNywgMzhcdWM3NDQgM1x1YzczY1x1Yjg1YyBcdWIwOThcdWIyMDggXHViMDk4XHViYTM4XHVjOWMwXHViMjk0IDEsIDIsIDAsIDJcdWM3NzRcdWIyZTQuJm5ic3A7PFwvcD5cclxuXHJcbjxwPlx1YzIxOCAxMFx1YWMxY1x1Yjk3YyBcdWM3ODVcdWI4MjVcdWJjMWJcdWM3N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