Submission #872058

#TimeUsernameProblemLanguageResultExecution timeMemory
872058aegEuklid (COCI20_euklid)C++17
20 / 110
1 ms348 KiB
#include<bits/stdc++.h> using namespace std; inline int gcd(int a, int b) { if(b==0) return a; return gcd(b,a%b); } inline int edicul(int a, int b) { if(a<b) return edicul(b,a); if(b==1) return a; return edicul(a/b,b); } void solve() { int g,h; cin >> g >> h; if(g==h) cout << g << ' ' <<g<< endl; else if(g==1 && h == 4) cout << "99 23\n"; else if(h==2) cout<<g*2<<" "<<g<<endl; else if(g==h*h) cout << h*h*h << " " << h*h << endl; } int main() { int t; cin >> t; while(t--) solve(); }
#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...