http://acm.nyist.net/JudgeOnline/problem.php?pid=205
View Code
1 #include<stdio.h> 2 #include<string.h> 3 int main() 4 { 5 long long t; 6 int len; 7 char str[1000010]; 8 scanf("%lld",&t); 9 while(t--) 10 { 11 long long yushu=0; 12 scanf("%s",str); 13 len=strlen(str); 14 for(int i=0;i<len;i++) 15 { 16 yushu=yushu*10+str[i]-'0'; 17 yushu=yushu%10003; 18 } 19 printf("%lld\n",yushu); 20 } 21 }