結果

問題 No.296 n度寝
ユーザー 水野嶺水野嶺
提出日時 2020-05-25 15:43:56
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 506 bytes
コンパイル時間 2,247 ms
コンパイル使用メモリ 74,256 KB
実行使用メモリ 41,716 KB
最終ジャッジ日時 2024-04-21 03:45:25
合計ジャッジ時間 5,467 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
41,644 KB
testcase_01 AC 129 ms
41,292 KB
testcase_02 AC 120 ms
40,268 KB
testcase_03 AC 133 ms
41,328 KB
testcase_04 AC 133 ms
41,164 KB
testcase_05 AC 133 ms
41,716 KB
testcase_06 AC 130 ms
41,460 KB
testcase_07 WA -
testcase_08 AC 132 ms
41,324 KB
testcase_09 AC 118 ms
40,340 KB
testcase_10 AC 126 ms
41,312 KB
testcase_11 AC 129 ms
41,332 KB
testcase_12 AC 128 ms
41,124 KB
testcase_13 AC 128 ms
41,352 KB
testcase_14 WA -
testcase_15 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.lang.*;
import java.io.*;

class Main
{
	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 stime =(n-1)*t;
		
		int sh = stime/60;
		if(n>=2&&(m+t)>60){
			sh +=1;
		}
		int ah =(h + sh)%24;
		
		int sm = stime%60;
		int am = (m + sm)%60;
		

		
		System.out.println(ah);
		System.out.println(am);
	}
}
0