結果
| 問題 |
No.70 睡眠の重要性!
|
| コンテスト | |
| ユーザー |
ぴろず
|
| 提出日時 | 2014-12-11 16:07:25 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 141 ms / 5,000 ms |
| コード長 | 487 bytes |
| コンパイル時間 | 2,305 ms |
| コンパイル使用メモリ | 74,800 KB |
| 実行使用メモリ | 54,512 KB |
| 最終ジャッジ日時 | 2024-06-11 20:35:24 |
| 合計ジャッジ時間 | 3,483 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 |
ソースコード
package no070;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int sum = 0;
for(int i=0;i<n;i++) {
int[] time = new int[2];
for(int j=0;j<2;j++) {
String[] s = sc.next().split(":");
time[j] = Integer.valueOf(s[0]) * 60 + Integer.valueOf(s[1]);
}
sum += (24 * 60 + (time[1] - time[0])) % (24 * 60);
}
System.out.println(sum);
}
}
ぴろず