結果

問題 No.296 n度寝
ユーザー TatsuDX
提出日時 2016-09-03 15:21:38
言語 Java
(openjdk 23)
結果
AC  
実行時間 115 ms / 1,000 ms
コード長 370 bytes
コンパイル時間 2,730 ms
コンパイル使用メモリ 74,076 KB
実行使用メモリ 54,196 KB
最終ジャッジ日時 2024-07-07 02:49:58
合計ジャッジ時間 5,094 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Test {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n, h, m, t, tm, ah, am;
		n = sc.nextInt();
		h = sc.nextInt();
		m = sc.nextInt();
		t = sc.nextInt();
		tm = h*60 + m + t*(n-1);
		ah = (tm/60)%24;
		am = tm%60;
		System.out.println(ah);
		System.out.println(am);

		sc.close();
	}
}
0