結果
問題 | No.35 タイパー高橋 |
ユーザー | fkwnw3_1243 |
提出日時 | 2017-04-23 21:04:37 |
言語 | Java21 (openjdk 21) |
結果 |
AC
|
実行時間 | 138 ms / 5,000 ms |
コード長 | 946 bytes |
コンパイル時間 | 2,227 ms |
コンパイル使用メモリ | 87,536 KB |
実行使用メモリ | 54,948 KB |
最終ジャッジ日時 | 2023-09-29 16:00:19 |
合計ジャッジ時間 | 3,504 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 129 ms
54,812 KB |
testcase_01 | AC | 132 ms
54,948 KB |
testcase_02 | AC | 136 ms
54,548 KB |
testcase_03 | AC | 138 ms
54,736 KB |
ソースコード
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); int N = Integer.parseInt(reader.readLine()); String[] line; int typebleCounter = 0; int notTypebleCounter = 0; for (int i = 0; i < N; i++) { line = reader.readLine().split(" "); int T = Integer.parseInt(line[0]); String S = line[1]; int typableLength = (12 * T)/1000; if(S.length() <= typableLength) { typebleCounter+=S.length(); } else { typebleCounter+=typableLength; notTypebleCounter += (S.length()-typableLength); } } System.out.println(typebleCounter + " " + notTypebleCounter); } }