题解 | #你能活多少秒#
你能活多少秒
http://www.nowcoder.com/practice/e1d1bd99fee34b66ae3c777b74d555c8
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int age = sc.nextInt();
double seconds = 3.156 * Math.pow(10, 7) * age;
Double d = new Double(seconds);
// 使用intValue 会出现精度问题,导致最后的值不正确
System.out.print(d.longValue());
}
}