| 比赛 | 欢乐五一练练练 | 评测结果 | AAAAAAAAAA |
|---|---|---|---|
| 题目名称 | 大整数取模 | 最终得分 | 100 |
| 用户昵称 | zChengYuan | 运行时间 | 0.002 s |
| 代码语言 | C++ | 内存使用 | 0.31 MiB |
| 提交时间 | 2017-04-26 20:02:51 | ||
#include <fstream>
#include <string>
#include <algorithm>
using namespace std;
ifstream fin("bigint.in");
ofstream fout("bigint.out");
int main()
{
long long res=0;
string s;
int a;
fin>>s>>a;
for(int i=0;i<s.length();++i)
{
res=(res*10+s[i]-'0')%a;
}
fout<<res<<endl;
}