結果
| 問題 | No.70 睡眠の重要性! |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-09-23 00:24:47 |
| 言語 | Java (openjdk 27.0.1.0.3 + ACL) |
| 結果 |
WA
不安定
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 912 bytes |
| 記録 | |
| コンパイル時間 | 3,384 ms |
| コンパイル使用メモリ | 95,824 KB |
| 実行使用メモリ | 52,224 KB |
| 最終ジャッジ日時 | 2026-11-20 20:13:40 |
| 合計ジャッジ時間 | 6,853 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 WA * 1 |
ソースコード
import java.text.SimpleDateFormat;
import java.util.Scanner;
public class Main_yukicoder70 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
SimpleDateFormat sdf = new SimpleDateFormat("h:m");
int n = sc.nextInt();
int ret = 0;
for (int i = 0; i < n; i++) {
try {
String ss = sc.next();
String ee = sc.next();
// System.err.println(ss);
// System.err.println(ee);
// System.err.println(sdf.parse(ss));
// System.err.println(sdf.parse(ee));
long s = sdf.parse(ss).getTime();
long e = sdf.parse(ee).getTime();
// System.err.println(s);
// System.err.println(e);
ret += (Math.abs((e - s + 3600 * 24 * 1000)) % (3600 * 24 * 1000)) / 60000;
} catch (Exception exc) {
// throw new RuntimeException();
sc.close();
return;
}
}
System.out.println(ret);
sc.close();
}
}