結果

問題 No.35 タイパー高橋
ユーザー koukonkokoukonko
提出日時 2015-12-07 16:32:45
言語 Java21
(openjdk 21)
結果
AC  
実行時間 159 ms / 5,000 ms
コード長 795 bytes
コンパイル時間 2,202 ms
コンパイル使用メモリ 79,084 KB
実行使用メモリ 54,776 KB
最終ジャッジ日時 2023-10-12 19:58:55
合計ジャッジ時間 3,281 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 138 ms
54,776 KB
testcase_01 AC 134 ms
54,540 KB
testcase_02 AC 144 ms
54,740 KB
testcase_03 AC 159 ms
54,760 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) {
		BufferedReader buff = new BufferedReader(new InputStreamReader(System.in));

		try {
			final double tp = 1000d / 12d;

			int count = Integer.parseInt(buff.readLine());

			int acc = 0, miss = 0;
			while (count-- > 0) {
				String[] str = buff.readLine().split(" ");
				int limitTime = Integer.parseInt(str[0]);
				int limitChar = (int)(limitTime / tp);

				if (limitChar < str[1].length()) {
					acc += limitChar;
					miss += str[1].length() - limitChar;
				} else {
					acc += str[1].length();
				}
			}

			System.out.println(acc + " " + miss);

		} catch (NumberFormatException e) {

		} catch (IOException e) {

		}
	}
}
0