import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
//本题对精度要求较高,请注意π的值应该取较精确的值。你可以使用常量来表示π,
//比如PI=3.14159265358979323,也可以使用数学公式来求π,比如PI=atan(1.0)*4。
int r = in.nextInt();
BigDecimal num1 = new BigDecimal(r);
BigDecimal temp = num1.multiply(num1).multiply(new BigDecimal(Math.PI));
BigDecimal result = temp.setScale(7, RoundingMode.HALF_UP);
System.out.println(result.toString());
in.close();
}
}
package com.shungen.basic;
import java.math.BigInteger;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
BigInteger temp1 = BigInteger.ONE;
BigInteger temp2 = new BigInteger(n + "");
// (temp1 + temp2) * temp2 /2
BigInteger result = (temp1.add(temp2)).multiply(temp2).divide(new BigInteger("2"));
System.out.println(result.toString());
in.close();
}
}