結果

問題 No.35 タイパー高橋
ユーザー Hiroaki KonoHiroaki Kono
提出日時 2017-10-28 07:56:17
言語 Java21
(openjdk 21)
結果
AC  
実行時間 237 ms / 5,000 ms
コード長 586 bytes
コンパイル時間 4,267 ms
コンパイル使用メモリ 73,360 KB
実行使用メモリ 61,420 KB
最終ジャッジ日時 2023-08-14 07:55:49
合計ジャッジ時間 4,946 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 230 ms
60,484 KB
testcase_01 AC 227 ms
60,284 KB
testcase_02 AC 237 ms
61,420 KB
testcase_03 AC 236 ms
61,252 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No35 {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int words = s.nextInt();
        int typed = 0;
        int missed = 0;
        for (int i = 0; i < words; i++) {
            int ms = s.nextInt();
            String word = s.next();
            int tmp = word.length() - ms * 12 / 1000;
            if (tmp < 0) {
                tmp = 0;
            }
            typed += word.length() - tmp;
            missed += tmp;
        }
        System.out.println(typed + " " + missed);
    }
}
0