题解 | #你能活多少秒#

你能活多少秒

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

#include <stdio.h>

int main() {
    int a;
    while (scanf("%d", &a) != EOF) { // 注意 while 处理多个 case
        // 64 位输出请用 printf("%lld") to 
        long int sec = a * 31560000;
        printf("%lld\n", sec);// 64 位输出请用 printf("%lld")
        //printf("size of long int: %d\n", sizeof(long int));//结果是8,说明long int足够大
    }
    return 0;
}

全部评论

相关推荐

程序员牛肉:你这其实一点都没包装,标准的流水线产品。 实习现在不一定能解决你的问题,你太浮躁了。你看了多少源码?看了多少技术博客?真的没必要这么浮躁的着急找实习,沉下心来学习
投递实习岗位前的准备
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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