0
点赞
收藏
分享

微信扫一扫

AcWing 667. 游戏时间

Villagers 2022-01-04 阅读 83
算法c++

链接
https://www.acwing.com/problem/content/669/

思路
学会将现实问题通过代码表示

#include <cstdio>

int main()
{
    int a, b;
    scanf("%d%d", &a, &b);

    int res;
    if (a < b) res = b - a;
    else  res = b - a + 24;

    printf("O JOGO DUROU %d HORA(S)\n", res);

    return 0;
}
举报

相关推荐

0 条评论