結果
問題 |
No.70 睡眠の重要性!
|
ユーザー |
![]() |
提出日時 | 2016-07-29 23:21:00 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 145 ms / 5,000 ms |
コード長 | 476 bytes |
コンパイル時間 | 2,285 ms |
コンパイル使用メモリ | 74,788 KB |
実行使用メモリ | 54,068 KB |
最終ジャッジ日時 | 2024-11-06 20:14:56 |
合計ジャッジ時間 | 3,553 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
ソースコード
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); while(sc.hasNext()){ int n=sc.nextInt(); int sum=0; for(int i=0;i<n;i++){ String[] s1=(sc.next()).split(":"); String[] s2=(sc.next()).split(":"); int t1=Integer.valueOf(s1[0])*60+Integer.valueOf(s1[1]); int t2=Integer.parseInt(s2[0])*60+Integer.valueOf(s2[1]); sum+=((t2-t1)+1440)%1440; } System.out.println(sum); } } }