# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
473818 | 2021-09-16T09:47:16 Z | Ahmed_Solyman | Euklid (COCI20_euklid) | C++14 | 1000 ms | 204 KB |
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll R(ll a,ll b){ if(a>b)return R(b,a); if(a>=b>1)return R(a/b,b); if(a>=b==1)return a; } int main() { ll t;cin>>t; while(t--){ ll g,h;cin>>g>>h; for(ll i=0;i<=1e18;i++){ bool b=0; for(ll j=0;j<=1e18;j++){ if(__gcd(i,j)==g && R(i,j)==h){ b=1; cout<<i<<" "<<j<<endl;break; } } if(b)break; } } return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1081 ms | 204 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1081 ms | 204 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1079 ms | 204 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1084 ms | 204 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1084 ms | 204 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1081 ms | 204 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |