結果

問題 No.35 タイパー高橋
ユーザー matsuyoshi30matsuyoshi30
提出日時 2018-05-07 22:14:24
言語 Java21
(openjdk 21)
結果
AC  
実行時間 238 ms / 5,000 ms
コード長 573 bytes
コンパイル時間 1,986 ms
コンパイル使用メモリ 73,836 KB
実行使用メモリ 61,044 KB
最終ジャッジ日時 2023-09-10 10:58:20
合計ジャッジ時間 3,655 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();

        int clear = 0, n_clear = 0;
        for(int i = 0; i < n; i++) {
            int t = in.nextInt();
            String s = in.next();

            int l = s.length();
            if(12*t/1000 >= l) {
                clear += l;
            } else {
                clear += 12*t/1000;
                n_clear += l - 12*t/1000;
            }
        }

        System.out.println(clear + " " + n_clear);
    }
}
0