157. Integer K-th Root
MediumBinary Search
Print the largest integer x with xᵏ ≤ n.
Input format
A single line: n k
Output format
x
Example 1
Input
27 3
Output
3
Example 2
Input
26 3
Output
2
Constraints
1 ≤ n ≤ 10¹⁸ 1 ≤ k ≤ 60
Read input from standard input and print the answer to standard output. Your code is judged against 5 test cases, most of them hidden.
Loading the MyLoginn IDE…