結果
問題 | No.70 睡眠の重要性! |
ユーザー |
|
提出日時 | 2019-02-14 22:28:23 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 139 ms / 5,000 ms |
コード長 | 480 bytes |
コンパイル時間 | 2,297 ms |
コンパイル使用メモリ | 74,560 KB |
実行使用メモリ | 54,184 KB |
最終ジャッジ日時 | 2024-09-13 11:34:23 |
合計ジャッジ時間 | 3,781 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
ソースコード
import java.util.*;class Main {static Scanner sc = new Scanner(System.in);public static void main(String[] args) {int n = sc.nextInt();int sum = 0;for (int i=0; i<n; i++) {String[] a = sc.next().split(":",0);String[] b = sc.next().split(":",0);int t1 = Integer.parseInt(a[0])*60 + Integer.parseInt(a[1]);int t2 = Integer.parseInt(b[0])*60 + Integer.parseInt(b[1]);int t = (t2-t1+1440)%1440;sum += t;}System.out.println(sum);}}