結果

問題 No.35 タイパー高橋
コンテスト
ユーザー koukonko
提出日時 2015-12-07 16:32:45
言語 Java
(openjdk 27 + ACL)
コンパイル:
javac -J-Duser.language=en -encoding UTF8 -cp /opt/aclib/ac_library.jar _filename_
実行:
java -ea -Xmx700m -Xss256M -DONLINE_JUDGE=true -cp .:/opt/aclib/ac_library.jar _class_
結果
AC  
実行時間 50 ms / 5,000 ms
+ 525µs
コード長 795 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,374 ms
コンパイル使用メモリ 85,908 KB
実行使用メモリ 43,960 KB
最終ジャッジ日時 2026-10-11 03:40:27
合計ジャッジ時間 2,454 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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