結果

問題 No.296 n度寝
ユーザー yu_017
提出日時 2019-02-03 09:55:17
言語 Java
(openjdk 23)
結果
AC  
実行時間 143 ms / 1,000 ms
コード長 373 bytes
コンパイル時間 4,499 ms
コンパイル使用メモリ 74,812 KB
実行使用メモリ 41,360 KB
最終ジャッジ日時 2024-12-15 18:53:32
合計ジャッジ時間 7,735 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class A000296 {
	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 t = sc.nextInt();
		sc.close();
		int rh = h;
		int rm = m;
		rh+=((n-1)*t+m)/60;
		rm =((n-1)*t+m)%60;
		System.out.println(rh%24);
		System.out.println(rm);
	}
}
0