怎么办?

P1161 开灯

求关注 ```c #include<bits/stdc++.h> using namespace std; int n,t;bool a[2000010]; double c; int main(){ scanf("%d",&n); for(int i=1; i<=n; i++){ cin>>c>>t; for(int j=1; j<=t; j++){ long long temp=c*j; if(a[temp]==false) a[temp]=true; else a[temp]=false; } } for(int i=1; i<=2000000; i++){ if(a[i]==true){ cout<<i; return 0; } } return 0; } ```
by Neither_rain_nor_sun @ 2023-11-28 20:20:22


|