import java.util.Scanner; public class Main { public static void main(String[] args) { //S=PI*R*R Scanner in = new Scanner(System.in); java.text.DecimalFormat df=new java.text.DecimalFormat("#.0000000"); int r = in.nextInt(); double s = Math.PI * r * r; System.out.println(df.format(s)); } }
原文:http://www.cnblogs.com/LuckyZcy/p/5163943.html