結果

問題 No.296 n度寝
ユーザー r.suzuki
提出日時 2015-12-09 16:54:29
言語 Java
(openjdk 23)
結果
AC  
実行時間 113 ms / 1,000 ms
コード長 548 bytes
コンパイル時間 2,748 ms
コンパイル使用メモリ 74,156 KB
実行使用メモリ 41,752 KB
最終ジャッジ日時 2024-07-06 22:33:58
合計ジャッジ時間 5,318 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Yuki{
	int againDream;
	
	void setAgainDream(int i){
		this.againDream = i;
	}
}

public class No_296 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		Yuki yuki = new Yuki();
		yuki.setAgainDream(sc.nextInt());
		int hour = sc.nextInt();
		int minute = sc.nextInt();
		int interval = sc.nextInt();
		
		minute += (yuki.againDream-1)*interval;
		hour += minute/60;
		minute %= 60;
		hour %= 24;
		
		System.out.println(hour);
		System.out.println(minute);
		sc.close();

	}

}
0