結果

問題 No.296 n度寝
ユーザー spacenaut
提出日時 2016-05-22 15:55:24
言語 Java
(openjdk 23)
結果
AC  
実行時間 127 ms / 1,000 ms
コード長 378 bytes
コンパイル時間 2,151 ms
コンパイル使用メモリ 75,196 KB
実行使用メモリ 54,256 KB
最終ジャッジ日時 2024-07-07 02:46:42
合計ジャッジ時間 4,240 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class No0296{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt() - 1;
		int h = sc.nextInt();
		int m = sc.nextInt();
		int t = sc.nextInt();

		for(int i = 0; i < n; i++){
			m += t;
		}
		if(m / 60 > 0){
			h = h + (m / 60);
			m = m % 60;
		}
		System.out.println(h % 24);
		System.out.println(m);
	}
}
0