大数取模问题.题目传送门:HDU1212 #include <iostream> using namespace std; char a[1010]; int main() { int b; while (cin >> a>> b) { int flag = 0; for (int i = 0; a[i] != '\0'; i++) flag = ((flag * 10) % b+ (a[i] - '0') %b) % b; cout << flag <…
大数MOD #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>…
Big Number Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 9006 Accepted Submission(s): 6100 Problem Description As we know, Big Number is always troublesome. But it's really important in ou…
大数MOD #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>…
Big Number Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 4594 Accepted Submission(s): 3175 Problem Description As we know, Big Number is always troublesome. But it's really important in ou…