Submission #473816

#TimeUsernameProblemLanguageResultExecution timeMemory
473816Ahmed_SolymanEuklid (COCI20_euklid)C++14
0 / 110
18 ms204 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...