游戏时间

题目 游戏时间

image-7177ab62

思路分析

代码实现

import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int a =sc.nextInt(),b=sc.nextInt();
        int res=b-a;
        if(res<=0)  res+=24;
        System.out.printf("O JOGO DUROU %d HORA(S)\n",res);
    }
}

同类题型

视频讲解


项目分区导航区间 ⬅️ | 04-游戏时间 | ➡️ 零食