#include<iostream> #include<cstring> using namespace std; int main() { char str[1234]; int s,len,sum; while(cin>>str>>s) { len=strlen(str); sum=0; for(int i=0;i<len;i++) sum=(sum*10+(str[i]-‘0‘)%s)%s; cout<<sum<<endl; } }
标签:大数 style nbsp cstring pac span space bsp main
#include<iostream> #include<cstring> using namespace std; int main() { char str[1234]; int s,len,sum; while(cin>>str>>s) { len=strlen(str); sum=0; for(int i=0;i<len;i++) sum=(sum*10+(str[i]-‘0‘)%s)%s; cout<<sum<<endl; } }
标签:大数 style nbsp cstring pac span space bsp main
原文地址:https://www.cnblogs.com/mayouyou/p/8508377.html