璟雯院

珺璟如晔,雯华若锦

用户工具

站点工具


icpc:problems:luogup1425
problems
名称小鱼的游泳时间
题目编号P1425
题目链接luogu.com.cn/…
来源Luogu
算法分类入门
难易程度入门

小鱼的游泳时间

想法

算总时间差

代码实现

#include <cstdio>
 
int main() {
    int a, b, c, d;
    scanf("%d %d %d %d", &a, &b, &c, &d);
    int cnt = c * 60 + d - (a * 60 + b);
    printf("%d %d", cnt / 60, cnt % 60);
    return 0;
}
/app/www/public/data/pages/icpc/problems/luogup1425.txt · 最后更改: 2024/04/20 14:58 由 温婕莺