結果

問題 No.296 n度寝
ユーザー yamax3232yamax3232
提出日時 2018-03-15 09:40:06
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 1,000 ms
コード長 449 bytes
コンパイル時間 3,162 ms
コンパイル使用メモリ 71,424 KB
実行使用メモリ 56,100 KB
最終ジャッジ日時 2023-08-21 22:12:52
合計ジャッジ時間 5,064 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,832 KB
testcase_01 AC 123 ms
55,516 KB
testcase_02 AC 121 ms
55,968 KB
testcase_03 AC 121 ms
55,460 KB
testcase_04 AC 122 ms
55,964 KB
testcase_05 AC 123 ms
55,840 KB
testcase_06 AC 122 ms
55,692 KB
testcase_07 AC 125 ms
56,100 KB
testcase_08 AC 122 ms
55,716 KB
testcase_09 AC 123 ms
55,756 KB
testcase_10 AC 122 ms
56,008 KB
testcase_11 AC 121 ms
55,708 KB
testcase_12 AC 122 ms
56,068 KB
testcase_13 AC 121 ms
55,712 KB
testcase_14 AC 122 ms
56,072 KB
testcase_15 AC 122 ms
55,704 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		
		Scanner kb=new Scanner(System.in);
		int n=kb.nextInt();
		int h=kb.nextInt();
		int m=kb.nextInt();
		int t=kb.nextInt();
		//h:m+(n-1)*t
		int neru=(n-1)*t;
		m+=neru;
		if(m>=60){
			h+=(m/60);
			m=(m%60);
		}
		if(h>23){
			h=h%24;
		}
		System.out.println(h);
		System.out.println(m);

	}

}
0