题解 | #你能活多少秒#

你能活多少秒

https://www.nowcoder.com/practice/e1d1bd99fee34b66ae3c777b74d555c8

#include <stdio.h>
#include<math.h>

int main() 
{
  int age;
  int a = pow(10,7);     //pow()函数调用了头文件#include<math.h>
  scanf("%d",&age);
  long age1 = age*3.156*a;    //若定义age1为int  会出现溢出
  printf("%ld",age1);
    return 0;
}

全部评论

相关推荐

狸猫换offer:神通广大的互联网
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务