結果

問題 No.35 タイパー高橋
ユーザー tentententen
提出日時 2020-11-10 10:20:48
言語 Java19
(openjdk 21)
結果
AC  
実行時間 209 ms / 5,000 ms
コード長 536 bytes
コンパイル時間 2,496 ms
コンパイル使用メモリ 73,704 KB
実行使用メモリ 61,228 KB
最終ジャッジ日時 2023-09-29 23:22:54
合計ジャッジ時間 4,076 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 202 ms
60,364 KB
testcase_01 AC 204 ms
60,272 KB
testcase_02 AC 207 ms
61,228 KB
testcase_03 AC 209 ms
60,996 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int win = 0;
        int lose = 0;
        for (int i = 0; i < n; i++) {
            int mili = sc.nextInt();
            int length = sc.next().length();
            int max = 12 * mili / 1000;
            int count = Math.min(length, max);
            win += count;
            lose += length - count;
        }
        System.out.println(win + " " + lose);
    }
}
0