結果
| 問題 | No.70 睡眠の重要性! |
| コンテスト | |
| ユーザー |
mits58
|
| 提出日時 | 2016-07-29 23:15:38 |
| 言語 | Java (openjdk 26.0.2.1 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 615 bytes |
| 記録 | |
| コンパイル時間 | 1,470 ms |
| コンパイル使用メモリ | 85,804 KB |
| 実行使用メモリ | 45,168 KB |
| 最終ジャッジ日時 | 2026-09-19 20:02:00 |
| 合計ジャッジ時間 | 2,827 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 5 WA * 1 |
ソースコード
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=24*60-Integer.valueOf(s1[0])*60-Integer.valueOf(s1[1]);
int t2=Integer.parseInt(s2[0])*60+Integer.valueOf(s2[1]);
if(t1>12*60) t1=-Integer.valueOf(s1[0])*60-Integer.valueOf(s1[1]);
if(t2>12*60) t2=Integer.valueOf(s2[0])*60+Integer.valueOf(s2[1])-24*60;
sum+=t1+t2;
}
System.out.println(sum);
}
}
}
mits58