#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<vector>
#include<algorithm>
#include<map>
using namespace std;
const int maxn = 40000 + 10;
#define INF 0x3f3f3f3f
#define clr(x,y) memset(x,y,sizeof x )
typedef long long ll;
#define eps 10e-10
const ll Mod = 1000000007;
typedef pair<ll, ll> P;
char s[maxn];
ll mod;
int main()
{
int n;
while( ~ scanf("%s%I64d",s,&mod))
{
ll ans = 0;
int len = strlen(s);
for(int i = 0; i < len; i ++)
{
ans = (ans * 10 + s[i] - '0') % mod;
}
printf("%I64d\n",ans);
}
return 0;
}
//68D1A35AC8
hdu 1212
最新推荐文章于 2021-03-17 07:49:06 发布