結果

問題 No.313 π
ユーザー _elzup__elzup_
提出日時 2016-05-31 16:40:57
言語 Java21
(openjdk 21)
結果
AC  
実行時間 298 ms / 5,000 ms
コード長 879 bytes
コンパイル時間 2,281 ms
コンパイル使用メモリ 76,864 KB
実行使用メモリ 48,476 KB
最終ジャッジ日時 2024-04-16 21:15:41
合計ジャッジ時間 12,811 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 261 ms
48,368 KB
testcase_01 AC 265 ms
47,748 KB
testcase_02 AC 275 ms
48,072 KB
testcase_03 AC 254 ms
47,800 KB
testcase_04 AC 298 ms
47,300 KB
testcase_05 AC 262 ms
47,180 KB
testcase_06 AC 258 ms
47,880 KB
testcase_07 AC 245 ms
47,736 KB
testcase_08 AC 267 ms
47,860 KB
testcase_09 AC 267 ms
47,144 KB
testcase_10 AC 266 ms
47,976 KB
testcase_11 AC 246 ms
47,752 KB
testcase_12 AC 256 ms
47,128 KB
testcase_13 AC 275 ms
48,192 KB
testcase_14 AC 251 ms
48,320 KB
testcase_15 AC 252 ms
47,568 KB
testcase_16 AC 284 ms
48,476 KB
testcase_17 AC 272 ms
47,752 KB
testcase_18 AC 247 ms
48,040 KB
testcase_19 AC 244 ms
48,320 KB
testcase_20 AC 247 ms
47,992 KB
testcase_21 AC 248 ms
48,332 KB
testcase_22 AC 259 ms
48,280 KB
testcase_23 AC 264 ms
47,336 KB
testcase_24 AC 258 ms
47,600 KB
testcase_25 AC 239 ms
47,268 KB
testcase_26 AC 239 ms
47,324 KB
testcase_27 AC 242 ms
47,660 KB
testcase_28 AC 259 ms
47,540 KB
testcase_29 AC 246 ms
47,964 KB
testcase_30 AC 252 ms
47,468 KB
testcase_31 AC 276 ms
47,492 KB
testcase_32 AC 255 ms
47,840 KB
testcase_33 AC 252 ms
47,788 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String input = sc.next();
        int[] lib = new int[]{ 20104, 20063, 19892, 20011, 19874, 20199, 19898, 20163, 19956, 19841 };
        int[] counts = new int[10];
        for (int i = 0; i < 200002; i++) {
            char c = input.charAt(i);
            if (c == '.') {
                continue;
            }
            counts[Integer.valueOf("" + c)] ++;
            // System.out.println(input.charAt(i));
        }
        int dummy = -1, piero = -1;
        for (int i = 0; i < counts.length; i++) {
            if (counts[i] > lib[i]) {
                dummy = i;
            }
            if (counts[i] < lib[i]) {
                piero = i;
            }
        }
        System.out.println(dummy + " " + piero);
    }
}
0