dulonghan2013 抄
第1个题解
提交记录
代码如下:
#include<bits/stdc++.h>
using namespace std;
int a[2000001], n;
double x, y;
int main(){
ios :: sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cin >> n;
for(int i = 1; i <= n; i ++){
cin >> x >> y;
for(double j = 1; j <= y; j ++){
if(a[int(j * x)] == 0) a[int(j * x)] = 1;
else a[int(j * x)] = 0;
}
}
for(int i = 1; ; i ++){
if(a[i] == 1){
cout << i;
break;
}
}
return 0;
}