| 比赛 | 20160303 | 评测结果 | AAAAAAAAAA |
|---|---|---|---|
| 题目名称 | 大整数取模 | 最终得分 | 100 |
| 用户昵称 | 1azyReaper | 运行时间 | 0.002 s |
| 代码语言 | C++ | 内存使用 | 0.37 MiB |
| 提交时间 | 2016-03-03 19:34:12 | ||
#include <fstream>
#include <algorithm>
#include <cstring>
#define MAX 190909
using namespace std;
ifstream fin("bigint.in");
ofstream fout("bigint.out");
int m,len;
int main()
{
char str[MAX];
long long ans=0;
fin>>str;
fin>>m;
len=strlen(str);
for(int i=0;i<len;i++)
ans=(ans*10+str[i]-'0')%m;
ans=(int)ans;
fout<<ans<<endl;
}//trl signed