Input
The first row has an integer m (1 <= m <= 8), indicating that there are M groups of test data;
Then there is a natural number N in each row of m rows.
Output
Returns the remainder of N after division by 10003. Each output occupies one row.
Sample Input
3
4
5
46545654
Sample output
4
5
6948
Same theorem: (a + B) % C = (a % C) + (B % C) % C
Example of M % N:
123% n = (1% N * 10% N + 2% N) % N * 10% N) % N + 3% N) % N
1 # include <stdio. h> 2 # include <string. H & gt; 3 # define n 1000001 4 5 Int main () {6 int t; 7 char number [N]; 8 int temp; 9 int I; 10 int length; 11 12 scanf ("% d", & T); 13 14 While (t --) {15 temp = 0; 16 17 scanf ("% s", number ); 18 length = strlen (number); // due to the large number of digits, 19 20 for (I = 0; I <length; I ++) 21 temp = (temp * 10 + (number [I]-'0') % 10003; 22 23 printf ("% d \ n", temp ); 24} 25 26 return 0; 27}
Evaluate the remainder of a large integer pair of 10003