結果

問題 No.296 n度寝
ユーザー kou6839
提出日時 2015-11-09 14:24:27
言語 Java
(openjdk 23)
結果
AC  
実行時間 117 ms / 1,000 ms
コード長 373 bytes
コンパイル時間 2,030 ms
コンパイル使用メモリ 74,016 KB
実行使用メモリ 41,632 KB
最終ジャッジ日時 2024-07-06 22:27:20
合計ジャッジ時間 4,278 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #


import java.util.*;

public 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 r = sc.nextInt();
		
		int ans_h = h;
		int ans_m = m+(n-1)*r;
		ans_h += (ans_m/60);
		ans_m %= 60;
		System.out.println(ans_h%24);
		System.out.println(ans_m);
	}
}

0