题解 | #KiKi和酸奶#

KiKi和酸奶

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

#include <stdio.h>

int main() {
    int a, b,c;
    while (scanf("%d %d %d", &a, &b ,&c) != EOF) { // 注意 while 处理多个 】
     //a多少没打开的酸奶
     //b几分钟喝光一盒
     //c经过了多少分钟
     //c/b 是在c分钟能喝多少酸奶
     //c%b 是打开了 没喝完
     a-=(c / b) + (c % b);  
     printf("%d",a);
     
    }
    return 0;
}

全部评论

相关推荐

点赞 评论 收藏
分享
04-10 08:14
门头沟学院 Java
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务