Submission #332045

#TimeUsernameProblemLanguageResultExecution timeMemory
332045dolphingarlicEuklid (COCI20_euklid)C++14
110 / 110
54 ms508 KiB
#include <bits/stdc++.h> typedef long long ll; using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int t; cin >> t; while (t--) { ll g, h; cin >> g >> h; ll b = h; while (b <= g) b *= h; while (b % g) b++; cout << h * b + g << ' ' << b << '\n'; } 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...