题解 | #小乐乐排电梯#

小乐乐排电梯

https://www.nowcoder.com/practice/0f855c7642b74cccb3c2366bb7732d2a

#include <stdio.h>

int main() {
    int a, b;
    int time;
    while (scanf("%d", &a) != EOF) { // 注意 while 处理多个 case
        // 64 位输出请用 printf("%lld") to 
        time = (a / 12) * 4;
        printf("%d\n", time + 2);
    }
    return 0;
}

全部评论

相关推荐

2025-12-31 14:19
门头沟学院 产品经理
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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