#include<cstdio>
#include<cstdlib>
#include<iostream>
#include<algorithm>
#include<memory.h>
#include<cstring>
#include<string> 
using namespace std;
string s;
long long  Mod;
int main()
{
    int i;
    while(cin>>s>>Mod){
        long long ans=0,p=1;
        int L=s.length()-1;
        for(i=0;i<=L;i++){
            ans=(ans*10+s[i]-'0')%Mod;
        }
        cout<<ans<<endl;
    }
    return 0;
}

 

 

 


 

相关文章:

  • 2021-09-22
  • 2021-07-23
  • 2021-08-24
  • 2021-10-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-28
  • 2022-02-11
  • 2022-01-15
  • 2021-10-01
  • 2021-12-27
  • 2021-08-05
  • 2021-10-08
相关资源
相似解决方案