题解 | #你能活多少秒#
你能活多少秒
https://www.nowcoder.com/practice/e1d1bd99fee34b66ae3c777b74d555c8
用到pow函数,因为函数值都是double类型的,所以把%f变成%.0f表示只要小数点后0位
#include <stdio.h>
#include <math.h>int main()
{
int age;
scanf("%d",&age);
printf("%.0f",age*3.156*pow(10,7));
return 0;
}