| 比赛 | 201712练习 | 评测结果 | WWWTTTTTTT |
|---|---|---|---|
| 题目名称 | 大整数取模 | 最终得分 | 0 |
| 用户昵称 | 李宴彬 | 运行时间 | 7.001 s |
| 代码语言 | C++ | 内存使用 | 0.17 MiB |
| 提交时间 | 2018-01-25 19:11:30 | ||
#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
long long m,n=0,len;
string str;
int main()
{
freopen("bigint.in","r",stdin);
freopen("bigint.out","w",stdout);
cin>>str;
cin>>m;
len=str.length();
for (int i=1;i<=len;i++)
{
n=n*10+str[i-1]-'0';
n%=m;
}
cout<<n<<endl;
return 0;
}