結果
| 問題 |
No.35 タイパー高橋
|
| コンテスト | |
| ユーザー |
SagToki
|
| 提出日時 | 2018-05-10 16:33:50 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 239 ms / 5,000 ms |
| コード長 | 1,416 bytes |
| コンパイル時間 | 6,204 ms |
| コンパイル使用メモリ | 76,372 KB |
| 実行使用メモリ | 57,060 KB |
| 最終ジャッジ日時 | 2024-06-28 03:27:24 |
| 合計ジャッジ時間 | 5,015 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 |
ソースコード
import java.util.*;
public class TyperTakahashi {
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
try{
int Section = scanner.nextInt();
int Success = 0;
int Failure = 0;
if(Section<1 || Section>1000){
System.out.println("1~1000の数字で範囲で入力してください");
System.exit(0);
}
for(int i = 0 ; i < Section ; i++){
int Time = scanner.nextInt();
String Text = scanner.next();
if(Time<1 || Time>30000){
System.out.println("1~30000の数字で範囲で入力してください");
System.exit(0);
}
if(Text.length() >= 12*Time/1000){
Failure += Text.length() - 12*Time/1000;
Success += 12*Time/1000;
}else{
Success += Text.length();
}
}
System.out.print(Success + " ");
System.out.println(Failure);
}catch(InputMismatchException e){
System.out.println("数字を入力してください");
}catch(Exception E){
System.out.println("予期せぬエラー");
}
}
}
SagToki