結果
| 問題 | No.70 睡眠の重要性! |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-04-25 16:22:07 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 74 ms / 5,000 ms |
| コード長 | 657 bytes |
| 記録 | |
| コンパイル時間 | 2,026 ms |
| コンパイル使用メモリ | 82,452 KB |
| 実行使用メモリ | 43,312 KB |
| 最終ジャッジ日時 | 2026-04-04 04:19:26 |
| 合計ジャッジ時間 | 2,826 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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);
}
}