結果

問題 No.296 n度寝
ユーザー FVRChanFVRChan
提出日時 2017-09-30 10:24:44
言語 Java21
(openjdk 21)
結果
AC  
実行時間 136 ms / 1,000 ms
コード長 379 bytes
コンパイル時間 2,089 ms
コンパイル使用メモリ 71,652 KB
実行使用メモリ 56,100 KB
最終ジャッジ日時 2023-08-09 22:30:29
合計ジャッジ時間 4,894 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 132 ms
56,100 KB
testcase_01 AC 128 ms
55,752 KB
testcase_02 AC 126 ms
55,804 KB
testcase_03 AC 122 ms
55,664 KB
testcase_04 AC 119 ms
55,448 KB
testcase_05 AC 128 ms
55,728 KB
testcase_06 AC 119 ms
55,536 KB
testcase_07 AC 136 ms
55,624 KB
testcase_08 AC 127 ms
55,544 KB
testcase_09 AC 120 ms
55,656 KB
testcase_10 AC 121 ms
55,740 KB
testcase_11 AC 119 ms
55,680 KB
testcase_12 AC 120 ms
55,996 KB
testcase_13 AC 120 ms
55,832 KB
testcase_14 AC 118 ms
55,668 KB
testcase_15 AC 120 ms
55,636 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Main{
	private static Scanner sc=new Scanner(System.in);
	public static void main(String args[])throws Exception{
		int n=sc.nextInt(),h=sc.nextInt(),m=sc.nextInt(),t=sc.nextInt();
		for(int i=0;i<n-1;i++){
			m+=t;
			while(m>=60){
				h++;m-=60;
			}while(h>=24){
				h-=24;
			}
		}
		System.out.println(h);
		System.out.println(m);
	}
}
0