/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package uva100;
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while (scanner.hasNextDouble()) {
double n = scanner.nextDouble();
double p = scanner.nextDouble();
System.out.printf("%.0f\n",Math.pow(p, (1/n)));
}
}
}
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package uva100;
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while (scanner.hasNextDouble()) {
double n = scanner.nextDouble();
double p = scanner.nextDouble();
System.out.printf("%.0f\n",Math.pow(p, (1/n)));
}
}
}