結果

問題 No.296 n度寝
ユーザー AoiroFukurouAoiroFukurou
提出日時 2016-01-05 15:22:26
言語 Java21
(openjdk 21)
結果
AC  
実行時間 136 ms / 1,000 ms
コード長 612 bytes
コンパイル時間 3,483 ms
コンパイル使用メモリ 72,184 KB
実行使用メモリ 56,424 KB
最終ジャッジ日時 2023-09-21 08:18:38
合計ジャッジ時間 6,633 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 136 ms
55,876 KB
testcase_01 AC 129 ms
56,424 KB
testcase_02 AC 130 ms
55,844 KB
testcase_03 AC 119 ms
56,056 KB
testcase_04 AC 120 ms
55,864 KB
testcase_05 AC 120 ms
55,420 KB
testcase_06 AC 116 ms
55,492 KB
testcase_07 AC 134 ms
56,128 KB
testcase_08 AC 132 ms
55,708 KB
testcase_09 AC 119 ms
55,712 KB
testcase_10 AC 117 ms
55,548 KB
testcase_11 AC 120 ms
55,736 KB
testcase_12 AC 121 ms
55,792 KB
testcase_13 AC 119 ms
55,956 KB
testcase_14 AC 117 ms
55,636 KB
testcase_15 AC 119 ms
55,628 KB
権限があれば一括ダウンロードができます

ソースコード

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();
	sc.close();
	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++){
		int h = 0;
		int m = 0;
		m += (n[3] % 60);
		n[2] += m;
		m =0;
		if(n[2] >= 60){
			n[1]++;
			n[2] -= 60;
		}
		h += (n[3] / 60);
		n[1] += h;
		h = 0;
		while(n[1] >= 24){
			n[1] -= 24;
		}
	}
	System.out.println(n[1]);
	System.out.println(n[2]);
}
}
0