結果

問題 No.296 n度寝
ユーザー 水野嶺水野嶺
提出日時 2020-05-25 15:49:02
言語 Java21
(openjdk 21)
結果
AC  
実行時間 119 ms / 1,000 ms
コード長 513 bytes
コンパイル時間 2,774 ms
コンパイル使用メモリ 75,584 KB
実行使用メモリ 41,536 KB
最終ジャッジ日時 2024-04-21 03:45:40
合計ジャッジ時間 4,376 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
41,364 KB
testcase_01 AC 119 ms
41,536 KB
testcase_02 AC 115 ms
41,156 KB
testcase_03 AC 111 ms
41,040 KB
testcase_04 AC 115 ms
41,240 KB
testcase_05 AC 113 ms
41,268 KB
testcase_06 AC 112 ms
41,112 KB
testcase_07 AC 118 ms
41,344 KB
testcase_08 AC 113 ms
41,276 KB
testcase_09 AC 116 ms
41,300 KB
testcase_10 AC 113 ms
41,088 KB
testcase_11 AC 115 ms
41,392 KB
testcase_12 AC 118 ms
41,196 KB
testcase_13 AC 104 ms
40,180 KB
testcase_14 AC 116 ms
41,144 KB
testcase_15 AC 112 ms
41,092 KB
権限があれば一括ダウンロードができます

ソースコード

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+stime%60)>=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