k-GCD
Practice
0 (0 votes)
Easy
Problem
61% Success 72 Attempts 20 Points 1s Time Limit 256MB Memory 1024 KB Max Code
You have given a code snippet -
int k = 0;
int gcd (int a, int b) {
if (b == 0)
return a;
else{
++k;
return gcd (b, a % b);
}
}
Find the minimum possible non-negative integers of \(a\) and \(b\) such that \(a > b\) and this code snippet outputs given \(k\) value.
INPUT FORMAT
-
The first line of the input contains a single integer \(T\) denoting the number of test cases.
-
Each test case consists of an integer \(k\).
OUTPUT FORMAT
Print two integers \(a\) and \(b\) separated by space such that \(a > b\).
CONSTRAINTS
\(1 \leq T \leq 10\)
\(1 \leq k \leq 50\)
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:20
1 votes
2.Guess it
Points:20
Tags:
EasyMath
Points:20
3 votes
Tags:
MathematicsApprovedEasyMathematicsMathamatics
Editorial
Login to unlock the editorial