結果

問題 No.296 n度寝
ユーザー Tsukasa_Type
提出日時 2018-02-10 15:23:24
言語 Java
(openjdk 23)
結果
AC  
実行時間 130 ms / 1,000 ms
コード長 336 bytes
コンパイル時間 1,964 ms
コンパイル使用メモリ 73,784 KB
実行使用メモリ 41,264 KB
最終ジャッジ日時 2024-10-13 13:17:37
合計ジャッジ時間 4,688 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		int n = sc.nextInt();
		int h = sc.nextInt();
		int m = sc.nextInt();
		int t = sc.nextInt();
		
		long time = (h*60) + m + (t*(n-1));
		System.out.println((time/60)%24);
		System.out.println(time%60);
	}
}
0