結果
| 問題 | No.70 睡眠の重要性! |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-04-25 16:22:07 |
| 言語 | Java (openjdk 27 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 55 ms / 5,000 ms |
| + 88µs | |
| コード長 | 657 bytes |
| 記録 | |
| コンパイル時間 | 1,424 ms |
| コンパイル使用メモリ | 85,628 KB |
| 実行使用メモリ | 45,424 KB |
| 最終ジャッジ日時 | 2026-10-11 12:28:51 |
| 合計ジャッジ時間 | 2,895 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 8 |
ソースコード
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = Integer.parseInt(sc.next());
int sum = 0;
for (int i = 0; i < N; i++) {
String G = sc.next();
String W = sc.next();
int Gh = Integer.parseInt(G.split(":")[0]);
int Gm = Integer.parseInt(G.split(":")[1]);
int Wh = Integer.parseInt(W.split(":")[0]);
int Wm = Integer.parseInt(W.split(":")[1]);
sum += ((Wh - Gh) * 60 + (Wm - Gm) + 24 * 60) % (24 * 60);
}
System.out.println(sum);
}
}