题解:P9930 [NFLSPC #6] 1064 病毒
yangziteng2728 · · 题解
核心结论
若迭代次数
一共存在
数字规模巨大,无法使用整数存储,采用字符串形式输出。
特判:当
AC 代码
#include<bits/stdc++.h>
#define int long long
using namespace std;
signed main() {
int n;
cin >> n;
for(int i = 1;i <= n;i++){
int x,y;
cin >> x >> y;
if(y >= 2){
cout << "213";
while(x--){
cout << '0';
}
}else{
cout << "11";
}
cout << endl;
}
return 0;
}