题库练习 [COCI-2006_2007-contest1]#4 MODULO
← 上一题 下一题 →

A1066 | [COCI-2006_2007-contest1]#4 MODULO

来源COCI
时间限制1s
内存限制128MB
通过 / 提交0/0

题目描述

Given two integers A and B, A modulo B is the remainder when dividing A by B. For example, the numbers 7, 14, 27 and 38 become 1, 2, 0 and 2, modulo
3. Write a program that accepts 10 numbers as input and outputs the number of distinct numbers in the input, if the numbers are considered modulo 4
2.

输入格式

The input will contain 10 non-negative integers, each smaller than 1000, one per line.

输出格式

Output the number of distinct values when considered modulo 42 on a single line.

输入输出样例

输入 #1
1 
2 
3 
4 
5 
6 
7 
8 
9 
10
输出 #1
10
输入 #2
42 
84 
252 
420 
840 
126 
42 
84 
420 
126 
输出 #2
1
输入 #3
39 
40 
41 
42 
43 
44 
82 
83 
84 
85 
输出 #3
6
C++ 编辑器
输入
输出