Sicily 1020. Big Integer
来源:互联网 发布:win7仿linux主题 编辑:程序博客网 时间:2024/04/30 04:20
#include <iostream>#include <string>using namespace std;int mod(string big, int basic){//int result;int len = big.length();int div = 0;for (int i = 0; i < len; ++i) {div = div * 10 + big[i] - '0';div %= basic;}return div;}int main(){int cases;cin >> cases;int basic[100];while (cases--) {int n;cin >> n;for (int i = 0; i < n; ++i) {cin >> basic[i];}string big_integer;cin >> big_integer;cout << '(';for (int i = 0; i < n; ++i) {if (i == n - 1) {cout << mod(big_integer, basic[i]) << ')' << endl;;} else {cout << mod(big_integer, basic[i]) << ',';}}}return 0;}
0 0
- Sicily.1020. Big Integer
- Sicily 1020. Big Integer
- sicily 1020. Big Integer
- Sicily 1020. Big Integer
- sicily 1020.Big Integer
- Sicily 1020. Big Integer
- [sicily]1020. Big Integer
- sicily 1020. Big Integer
- [sicily] 1020. Big Integer
- [sicily online]1020. Big Integer
- Sicily 1020 Big Integer
- sicily 1020 Big Integer
- Sicily 1020 Big Integer
- sicily 1020 Big Integer
- sicily 1020 Big Integer
- Sicily 1020. Big Integer | 大整数取模运算
- Sicily 1020 Big Integer(高精度运算)
- 1020. Big Integer
- POJ 2449 Remmarguts' Date ( Dijkstra + A* 求解第K短路 )
- 最新场景文字检测进展(含代码)
- C++ RTTI及“反射”技术
- tmux的使用方法和个性化配置
- photoshopRGB颜色模式-调色教程
- Sicily 1020. Big Integer
- Spring整合CXF,发布RSETful 风格WebService
- 大数相加模板
- 椭圆扫描 Bresenham算法 VC++
- Field '***' doesn't have a default value:mysql
- 【MonogDB】The description of index(二) Embedded and document Index
- adb shell 杀进程 杀包名
- Windows 进程通信的几种方式
- Excel学习笔记一关于色彩