题解 | #你能活多少秒#
你能活多少秒
https://www.nowcoder.com/practice/e1d1bd99fee34b66ae3c777b74d555c8
#include <stdio.h> int main () { long int a,b;//由于年龄,秒数都比较长,故想到使用长整型,整型会发生溢出 scanf("%ld",&a);//对应也需要长整型的%ld b = a*31560000; printf("%ld",b); return 0; }
你能活多少秒
https://www.nowcoder.com/practice/e1d1bd99fee34b66ae3c777b74d555c8
#include <stdio.h> int main () { long int a,b;//由于年龄,秒数都比较长,故想到使用长整型,整型会发生溢出 scanf("%ld",&a);//对应也需要长整型的%ld b = a*31560000; printf("%ld",b); return 0; }
相关推荐