結果

問題 No.296 n度寝
ユーザー 水野嶺水野嶺
提出日時 2020-05-25 15:29:31
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 465 bytes
コンパイル時間 2,060 ms
コンパイル使用メモリ 74,280 KB
実行使用メモリ 41,464 KB
最終ジャッジ日時 2024-04-21 03:44:47
合計ジャッジ時間 4,814 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 131 ms
41,352 KB
testcase_04 AC 116 ms
39,948 KB
testcase_05 AC 129 ms
41,208 KB
testcase_06 AC 128 ms
41,136 KB
testcase_07 AC 129 ms
41,120 KB
testcase_08 AC 123 ms
40,036 KB
testcase_09 WA -
testcase_10 AC 131 ms
41,112 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 133 ms
41,400 KB
testcase_14 AC 119 ms
39,972 KB
testcase_15 AC 120 ms
40,136 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;
		int ah =(h + sh)%24;
		
		int sm = stime%60;
		int am = (m + sm)%60;
		
		System.out.println(ah);
		System.out.println(am);
	}
}
0