1 条题解
- 
  0
#include<map> #include<list> #include<stack> #include<queue> #include<cmath> #include<queue> #include<stack> #include<deque> #include<math.h> #include<cstdio> #include<string> #include<vector> #include<cstring> #include<fstream> #include<stdio.h> #include<sstream> #include<iomanip> #include<iostream> #include<string.h> #include<algorithm> #include<bits/stdc++.h> using namespace std; #define LL long long const int N=1e6+10; const int INF=0x3f3f3f3f; long long n,a,b,x,y,z; int main() { cin>>n>>x>>y; z=y; for(long long i=2;i<=n;i++) { cin>>a>>b; z=y; while(z%a!=b) { z+=x; } x*=a; y=z%x; } cout<<z; return 0; } 
信息
- ID
 - 512
 - 时间
 - 1000ms
 - 内存
 - 512MiB
 - 难度
 - 5
 - 标签
 - 递交数
 - 21
 - 已通过
 - 13
 - 上传者