mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
19 lines
304 B
C++
19 lines
304 B
C++
#include<stdio.h>
|
|
#include<string.h>
|
|
int main()
|
|
{
|
|
int n,i,t;
|
|
char a[1010];
|
|
while(scanf("%s%d",&a,&n)!=EOF)
|
|
{
|
|
t=0;
|
|
for(i=0;i<strlen(a);i++)
|
|
{
|
|
t=t*10+a[i]-'0';
|
|
t%=n;
|
|
}
|
|
printf("%d\n",t);
|
|
}
|
|
return 0;
|
|
}
|