比赛 20160303 评测结果 AAAAAAWAWW
题目名称 大整数取模 最终得分 70
用户昵称 KZNS 运行时间 0.002 s
代码语言 C++ 内存使用 0.31 MiB
提交时间 2016-03-03 19:32:33
显示代码纯文本
  1. //KZNS
  2. #include <fstream>
  3. #include <cstring>
  4. using namespace std;
  5. int main() {
  6. ifstream fin ("bigint.in");
  7. ofstream fout ("bigint.out");
  8. string s;
  9. fin >>s;
  10. int m;
  11. fin >>m;
  12. long int n=0;
  13. for (int i=0; i<s.length(); i++) {
  14. n=n*10+s[i]-'0';
  15. n%=m;
  16. }
  17. fout <<n;
  18. return 0;
  19. }
  20. //UBWH