結果

問題 No.296 n度寝
ユーザー spacenautspacenaut
提出日時 2016-05-22 15:55:24
言語 Java21
(openjdk 21)
結果
AC  
実行時間 131 ms / 1,000 ms
コード長 378 bytes
コンパイル時間 1,984 ms
コンパイル使用メモリ 71,156 KB
実行使用メモリ 56,108 KB
最終ジャッジ日時 2023-09-21 08:25:15
合計ジャッジ時間 4,983 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
55,864 KB
testcase_01 AC 129 ms
55,572 KB
testcase_02 AC 131 ms
55,780 KB
testcase_03 AC 126 ms
55,456 KB
testcase_04 AC 127 ms
55,688 KB
testcase_05 AC 127 ms
55,676 KB
testcase_06 AC 129 ms
56,108 KB
testcase_07 AC 131 ms
55,652 KB
testcase_08 AC 130 ms
55,784 KB
testcase_09 AC 126 ms
55,968 KB
testcase_10 AC 126 ms
55,796 KB
testcase_11 AC 127 ms
55,676 KB
testcase_12 AC 124 ms
55,664 KB
testcase_13 AC 126 ms
56,004 KB
testcase_14 AC 124 ms
55,716 KB
testcase_15 AC 127 ms
55,852 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class No0296{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt() - 1;
		int h = sc.nextInt();
		int m = sc.nextInt();
		int t = sc.nextInt();

		for(int i = 0; i < n; i++){
			m += t;
		}
		if(m / 60 > 0){
			h = h + (m / 60);
			m = m % 60;
		}
		System.out.println(h % 24);
		System.out.println(m);
	}
}
0