import java.text.DecimalFormat;import java.util.Scanner;public class Main{ public static void main(String args[]){ Scanner scan = new Scanner(System.in); DecimalFormat df = new DecimalFormat("0.00"); while(scan.hasNext()){ String str[] = scan.nextLine().split(" "); double num = Double.parseDouble(str[0]); int m = Integer.parseInt(str[1]); double sum = num; for(int i=1; i<m; ++i) { sum += Math.sqrt(num); num = Math.sqrt(num); } System.out.PRintln(df.format(sum)); } }}
新闻热点
疑难解答