結果

問題 No.296 n度寝
ユーザー FVRChanFVRChan
提出日時 2017-09-30 10:24:44
言語 Java21
(openjdk 21)
結果
AC  
実行時間 118 ms / 1,000 ms
コード長 379 bytes
コンパイル時間 1,668 ms
コンパイル使用メモリ 73,724 KB
実行使用メモリ 54,248 KB
最終ジャッジ日時 2024-04-27 16:48:24
合計ジャッジ時間 4,148 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
52,936 KB
testcase_01 AC 118 ms
54,084 KB
testcase_02 AC 115 ms
53,996 KB
testcase_03 AC 109 ms
53,920 KB
testcase_04 AC 109 ms
53,924 KB
testcase_05 AC 110 ms
53,836 KB
testcase_06 AC 107 ms
53,764 KB
testcase_07 AC 114 ms
52,960 KB
testcase_08 AC 112 ms
54,248 KB
testcase_09 AC 94 ms
52,432 KB
testcase_10 AC 110 ms
54,096 KB
testcase_11 AC 118 ms
54,012 KB
testcase_12 AC 116 ms
53,932 KB
testcase_13 AC 99 ms
52,416 KB
testcase_14 AC 106 ms
53,552 KB
testcase_15 AC 97 ms
54,020 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