667. 游戏时间(C++语法题)

83 阅读1分钟

在这里插入图片描述

#include <cstdio>
#include <iostream>

using namespace std;

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;
}