結果
| 問題 | No.70 睡眠の重要性! |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-04-25 16:22:07 |
| 言語 | Java (openjdk 26.0.2.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 55 ms / 5,000 ms |
| + 824µs | |
| コード長 | 657 bytes |
| 記録 | |
| コンパイル時間 | 1,381 ms |
| コンパイル使用メモリ | 84,656 KB |
| 実行使用メモリ | 43,040 KB |
| 最終ジャッジ日時 | 2026-08-26 01:28:53 |
| 合計ジャッジ時間 | 2,766 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 |
ソースコード
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);
}
}