結果
| 問題 |
No.296 n度寝
|
| コンテスト | |
| ユーザー |
ohagi_1182
|
| 提出日時 | 2017-10-13 22:30:16 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 471 bytes |
| コンパイル時間 | 2,072 ms |
| コンパイル使用メモリ | 73,820 KB |
| 実行使用メモリ | 41,600 KB |
| 最終ジャッジ日時 | 2024-11-17 11:33:55 |
| 合計ジャッジ時間 | 4,769 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 WA * 3 |
ソースコード
import java.util.Scanner;
public class Main {
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();
int ans1 = 0; int ans2 = 0;
int x = h * 60 * 60 + m * 60;
for(int i = 0 ; i < n - 1 ; i++) {
x += t * 60;
}
x %= 3600 * 24;
ans1 = x / 3600;
ans2 = (x - ans1 * 3600) / 60;
System.out.println(ans1);
System.out.println(ans2);
}
}
ohagi_1182