結果

問題 No.296 n度寝
ユーザー AoiroFukurouAoiroFukurou
提出日時 2016-01-05 14:08:26
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 504 bytes
コンパイル時間 4,219 ms
コンパイル使用メモリ 74,996 KB
実行使用メモリ 57,584 KB
最終ジャッジ日時 2023-10-19 15:18:44
合計ジャッジ時間 6,684 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 125 ms
57,540 KB
testcase_04 AC 111 ms
56,124 KB
testcase_05 AC 121 ms
57,068 KB
testcase_06 AC 110 ms
56,132 KB
testcase_07 WA -
testcase_08 AC 129 ms
57,472 KB
testcase_09 WA -
testcase_10 AC 123 ms
57,460 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 123 ms
57,520 KB
testcase_14 WA -
testcase_15 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

package yuki_coder;

import java.util.Scanner;

public class No_296 {
public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	String s = sc.nextLine();
	String[] str = s.split(" ", 0);
	int[] n = new int[4];
	for(int i = 0; i < 4; i++){
		n[i] = Integer.parseInt(str[i]);
	}
	n[0]--;
	
	for(int i = 0; i < n[0]; i++){
		if(n[2] >= 60){
			if(n[1]>=24){
				n[1] = 0;
			}
			n[1]++;
			n[2] += -60;
		}
		n[2] += n[3];
	}
	System.out.println(n[1]);
	System.out.println(n[2]);
}
}
0