結果

問題 No.296 n度寝
ユーザー mtokmtok
提出日時 2016-04-01 16:49:42
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 659 bytes
コンパイル時間 2,729 ms
コンパイル使用メモリ 74,372 KB
実行使用メモリ 51,296 KB
最終ジャッジ日時 2024-04-10 07:06:32
合計ジャッジ時間 3,950 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 57 ms
50,364 KB
testcase_04 AC 55 ms
50,204 KB
testcase_05 AC 57 ms
50,412 KB
testcase_06 AC 56 ms
50,604 KB
testcase_07 WA -
testcase_08 AC 70 ms
51,180 KB
testcase_09 WA -
testcase_10 AC 55 ms
50,144 KB
testcase_11 AC 55 ms
50,048 KB
testcase_12 AC 57 ms
49,812 KB
testcase_13 AC 54 ms
49,940 KB
testcase_14 AC 56 ms
50,376 KB
testcase_15 AC 57 ms
49,812 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args)throws Exception{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line = br.readLine();
        String[] str = line.split(" ");
        int n=Integer.parseInt(str[0]),h=Integer.parseInt(str[1]),m=Integer.parseInt(str[2]),t=Integer.parseInt(str[3]);
        while(n>1){
        	n--;
        	m+=t;
        	if(m>=60){
        		m-=60;
        		h++;
        	}
        	if(h>=24){
        		h-=24;
        	}
        }
        System.out.println(h);
        System.out.println(m);
	}
}
0