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\)
Submissions
Please login to view your submissions
Similar Problems
Points:20
1 votes
Points:20
8 votes
Tags:
Basic ProgrammingMathematicsOpenApprovedEasyMathamatics
Points:20
4 votes
Tags:
Easy
Editorial