結果
| 問題 |
No.35 タイパー高橋
|
| コンテスト | |
| ユーザー |
muston
|
| 提出日時 | 2016-05-18 14:54:20 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 232 ms / 5,000 ms |
| コード長 | 856 bytes |
| コンパイル時間 | 2,815 ms |
| コンパイル使用メモリ | 76,332 KB |
| 実行使用メモリ | 57,180 KB |
| 最終ジャッジ日時 | 2024-10-06 05:30:00 |
| 合計ジャッジ時間 | 3,832 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 |
ソースコード
import java.io.*;
import java.util.*;
/*yukicoder No.35 タイパー高橋*/
class No35{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int n=scan.nextInt(); //区関数nを入力
int sumWrite=0; //打った文字数の合計
int notWrite=0; //打てなかった文字数の合計
for(int i=0;i<n;i++){
int t =scan.nextInt(); //秒数tを入力
String s = scan.next(); //文字sを入力
int write = 12*t/1000; //t秒で打てる文字数
//打った文字数の合計を出す
if(s.length()<write){
sumWrite += s.length();
}
else{
sumWrite += write;
//打てなかった文字数の合計を出す
notWrite += s.length()-write;
}
}
System.out.print(sumWrite + " ");
System.out.println(notWrite);
}
}
muston