結果
| 問題 |
No.296 n度寝
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-04-01 16:49:42 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 659 bytes |
| コンパイル時間 | 2,199 ms |
| コンパイル使用メモリ | 74,300 KB |
| 実行使用メモリ | 53,248 KB |
| 最終ジャッジ日時 | 2024-10-02 08:48:55 |
| 合計ジャッジ時間 | 3,576 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 WA * 5 |
ソースコード
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args)throws Exception{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = br.readLine();
String[] str = line.split(" ");
int n=Integer.parseInt(str[0]),h=Integer.parseInt(str[1]),m=Integer.parseInt(str[2]),t=Integer.parseInt(str[3]);
while(n>1){
n--;
m+=t;
if(m>=60){
m-=60;
h++;
}
if(h>=24){
h-=24;
}
}
System.out.println(h);
System.out.println(m);
}
}