| 比赛 | 201712练习 | 评测结果 | AAAAAAAAAA |
|---|---|---|---|
| 题目名称 | 大整数取模 | 最终得分 | 100 |
| 用户昵称 | @@@ | 运行时间 | 0.009 s |
| 代码语言 | C++ | 内存使用 | 0.32 MiB |
| 提交时间 | 2017-12-27 21:14:42 | ||
#include <cstdio>
#include <iostream>
#include <string>
#include <algorithm>
#define LL long long
using namespace std;
LL int n;
char c;
string s;
LL int ans = 0;
int main()
{
freopen("bigint.in","r",stdin);
freopen("bigint.out","w",stdout);
cin >> s >> n;
for(int i = 0;i < s.length();i++ )
{
ans*=10;
ans+=s[i]-'0';
ans%=n;
}
cout << ans;
return 0;
}