标签:ring i++ \n bsp define ase cst pre ++
#include<cstdio> #include<cstdlib> #include<cstring> #define N 10000 int main() { char str[N]; int len;int i; int mod; int ans=0; int Case; scanf("%d",&Case); while(Case--){ scanf("%s",str); //getchar(); scanf("%d",&mod); len=strlen(str); for(i=0;i<len;i++) ans=(int)(((long long)ans*10+str[i]-‘0‘)%mod); ans=(int)ans; printf("%d\n",ans); } return 0; }
标签:ring i++ \n bsp define ase cst pre ++
原文地址:https://www.cnblogs.com/xiao-xue-di/p/9454323.html