#include <stdio.h> #include <math.h> int main() { int age; int long s; scanf("%d", &age); if (0<age && age<=200) { s=age*3.156*pow(10,7); printf("%ld\n",s); } return 0; }
注意修饰秒数要用长整型,不然不够用。这题主要考你对各种类型的取值范围是否清楚。