問題:http://acm.pku.edu.cn/JudgeOnline/problem?id=2109
順位:http://acm.pku.edu.cn/JudgeOnline/problemstatus?problem_id=2109&language=2&orderby=clen
提出コード(171B)
import java.util.*;class Main{static{for(Scanner s=new Scanner(System.in);s.hasNext();){int n=s.nextInt();System.out.println(Math.round(Math.pow(s.nextDouble(),1./n)));}}}
整形コード
class Main { static { for (Scanner s = new Scanner(System.in); s.hasNext();) { int n = s.nextInt(); System.out.println(Math.round(Math.pow(s.nextDouble(), 1. / n))); } } }