Submission #473816

# Submission time Handle Problem Language Result Execution time Memory
473816 2021-09-16T09:44:57 Z Ahmed_Solyman Euklid (COCI20_euklid) C++14
0 / 110
18 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<=g;i++){
            bool b=0;
            for(ll j=0;j<=h;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 Incorrect 0 ms 204 KB Unexpected end of file - int64 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 18 ms 204 KB Unexpected end of file - int64 expected
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 -
# 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 Incorrect 1 ms 204 KB Integer parameter [name=a] equals to 0, violates the range [1, 10^18]
2 Halted 0 ms 0 KB -