結果

問題 No.296 n度寝
ユーザー shinwisteriashinwisteria
提出日時 2018-02-16 23:16:00
言語 Java21
(openjdk 21)
結果
AC  
実行時間 158 ms / 1,000 ms
コード長 442 bytes
コンパイル時間 5,300 ms
コンパイル使用メモリ 72,460 KB
実行使用メモリ 57,040 KB
最終ジャッジ日時 2023-09-05 09:59:48
合計ジャッジ時間 8,778 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 158 ms
56,500 KB
testcase_01 AC 156 ms
56,780 KB
testcase_02 AC 153 ms
56,776 KB
testcase_03 AC 157 ms
56,456 KB
testcase_04 AC 154 ms
56,720 KB
testcase_05 AC 154 ms
56,972 KB
testcase_06 AC 155 ms
56,852 KB
testcase_07 AC 153 ms
56,872 KB
testcase_08 AC 154 ms
56,816 KB
testcase_09 AC 155 ms
56,496 KB
testcase_10 AC 155 ms
57,040 KB
testcase_11 AC 153 ms
56,460 KB
testcase_12 AC 153 ms
56,572 KB
testcase_13 AC 154 ms
56,668 KB
testcase_14 AC 153 ms
56,856 KB
testcase_15 AC 154 ms
56,432 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package m.shin;
import java.util.Scanner;
public class Con296 {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner s = new Scanner(System.in);
		int N = s.nextInt() , H = s.nextInt() , M = s.nextInt() , T = s.nextInt();
		s.close();

		H = (H + (T*(N-1)) /60) % 24;
		if((M = M + (T*(N-1)) %60) > 59){
			H = (H + 1) % 24;
		}
		M = M % 60;
		System.out.println(H + "\n" + M);

	}

}
0