题目描述
Problem Description
Given 10 integers, determine how many distinct remainders are obtained when each integer is divided by 42.
- In the first example, the ten results are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, which are 10 distinct results.
- In the second example, all results are 0, so there is only one distinct result.
- In the third example, the remainders are 39, 40, 41, 0, 1, 2, 40, 41, 0, 1, resulting in six distinct remainders: 0, 1, 2, 39, 40, 41.
Input Format
The input contains 10 non-negative integers, each less than 1000, provided one per line.
Output Format
Output the number of distinct values when considered modulo 42 on a single line.
Sample Input and Output
Sample Input #1
1
2
3
4
5
6
7
8
9
10
Sample Output #1
10
Sample Input #2
42
84
252
420
840
126
42
84
420
126
Sample Output #2
1
Sample Input #3
39
40
41
42
43
44
82
83
84
85
Sample Output #3
6
Notes
In the first example, the numbers modulo 42 are 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10.
In the second example, all numbers modulo 42 are 0.
In the third example, the numbers modulo 42 are 39, 40, 41, 0, 1, 2, 40, 41, 0, and 1. There are 6 distinct numbers.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分
样例输入
1
2
3
4
5
6
7
8
9
10
样例输出
10