| 比赛 | 20160303 | 评测结果 | AAAAAAAAAA |
|---|---|---|---|
| 题目名称 | 大整数取模 | 最终得分 | 100 |
| 用户昵称 | Fancy | 运行时间 | 0.002 s |
| 代码语言 | C++ | 内存使用 | 0.29 MiB |
| 提交时间 | 2016-03-03 19:27:48 | ||
#include<cstring>
#include<cstdio>
using namespace std;
int n,m,len;
char s[105];
int main()
{
freopen("bigint.in","r",stdin);
freopen("bigint.out","w",stdout);
scanf("%s%d",s,&m);
len=strlen(s);
for(int i=0;i<len;i++)
n=((long long)n*10+s[i]-'0')%m;
printf("%d\n",n);
}