--- title: "04-游戏时间" created: 2025-12-02 tags: - 项目 aliases: - 游戏时间 --- # 游戏时间 ## 题目 [游戏时间](https://www.acwing.com/problem/content/669/) ![[image-7177ab62.png]] ## 思路分析 ## 代码实现 ```java 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); } } ``` ## 同类题型 ## 视频讲解 --- **项目分区导航**: [[03-区间|区间]] ⬅️ | 04-游戏时间 | ➡️ [[05-零食|零食]]