Submission #473817

# Submission time Handle Problem Language Result Execution time Memory
473817 2021-09-16T09:45:27 Z Ahmed_Solyman Euklid (COCI20_euklid) C++14
0 / 110
1000 ms 204 KB
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

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 && max(i,j)==h){
                    b=1;
                    cout<<i<<" "<<j<<endl;break;
                }
            }
            if(b)break;
        }
    }
    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Integer parameter [name=a] equals to 0, violates the range [1, 10^18]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1080 ms 204 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1075 ms 204 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1045 ms 204 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1045 ms 204 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Integer parameter [name=a] equals to 0, violates the range [1, 10^18]
2 Halted 0 ms 0 KB -