結果
| 問題 | No.70 睡眠の重要性! |
| コンテスト | |
| ユーザー |
tenten
|
| 提出日時 | 2020-11-10 15:15:27 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 57 ms / 5,000 ms |
| コード長 | 572 bytes |
| 記録 | |
| コンパイル時間 | 1,712 ms |
| コンパイル使用メモリ | 82,620 KB |
| 実行使用メモリ | 46,396 KB |
| 最終ジャッジ日時 | 2026-04-03 10:14:17 |
| 合計ジャッジ時間 | 2,689 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 |
ソースコード
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
long ans = 0;
for (int i = 0; i < n; i++) {
int start = getTime(sc.next());
int end = getTime(sc.next());
ans += (end - start + 60 * 24) % (60 * 24);
}
System.out.println(ans);
}
static int getTime(String s) {
String[] arr = s.split(":", 2);
return Integer.parseInt(arr[0]) * 60 + Integer.parseInt(arr[1]);
}
}
tenten