結果

問題 No.296 n度寝
ユーザー 8130Tsk8130Tsk
提出日時 2015-11-15 13:00:11
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 1,000 ms
コード長 364 bytes
コンパイル時間 4,062 ms
コンパイル使用メモリ 72,212 KB
実行使用メモリ 56,168 KB
最終ジャッジ日時 2023-09-21 03:51:41
合計ジャッジ時間 6,984 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
56,072 KB
testcase_01 AC 127 ms
55,668 KB
testcase_02 AC 127 ms
55,692 KB
testcase_03 AC 126 ms
55,820 KB
testcase_04 AC 127 ms
56,168 KB
testcase_05 AC 127 ms
55,992 KB
testcase_06 AC 125 ms
55,964 KB
testcase_07 AC 125 ms
55,728 KB
testcase_08 AC 125 ms
55,768 KB
testcase_09 AC 125 ms
55,944 KB
testcase_10 AC 126 ms
53,956 KB
testcase_11 AC 126 ms
55,900 KB
testcase_12 AC 125 ms
55,944 KB
testcase_13 AC 125 ms
55,988 KB
testcase_14 AC 125 ms
56,028 KB
testcase_15 AC 125 ms
53,896 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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

		int overTime = t*(n-1);
		h+=(overTime+m)/60;
		h%=24;
		m+=overTime;
		m%=60;
		
		System.out.println(h);
		System.out.println(m);
	}
}
0