結果

問題 No.313 π
ユーザー tentententen
提出日時 2020-12-23 16:26:02
言語 Java21
(openjdk 21)
結果
AC  
実行時間 251 ms / 5,000 ms
コード長 699 bytes
コンパイル時間 2,157 ms
コンパイル使用メモリ 85,812 KB
実行使用メモリ 61,884 KB
最終ジャッジ日時 2023-10-21 15:12:25
合計ジャッジ時間 12,063 ms
ジャッジサーバーID
(参考情報)
judge13 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 233 ms
61,580 KB
testcase_01 AC 239 ms
61,144 KB
testcase_02 AC 236 ms
58,896 KB
testcase_03 AC 236 ms
60,784 KB
testcase_04 AC 241 ms
61,580 KB
testcase_05 AC 242 ms
60,884 KB
testcase_06 AC 242 ms
61,292 KB
testcase_07 AC 246 ms
61,352 KB
testcase_08 AC 239 ms
61,760 KB
testcase_09 AC 242 ms
61,504 KB
testcase_10 AC 243 ms
61,104 KB
testcase_11 AC 248 ms
61,860 KB
testcase_12 AC 241 ms
61,092 KB
testcase_13 AC 251 ms
61,292 KB
testcase_14 AC 237 ms
60,944 KB
testcase_15 AC 236 ms
61,224 KB
testcase_16 AC 240 ms
60,948 KB
testcase_17 AC 235 ms
61,208 KB
testcase_18 AC 235 ms
61,340 KB
testcase_19 AC 237 ms
61,872 KB
testcase_20 AC 236 ms
60,984 KB
testcase_21 AC 237 ms
60,976 KB
testcase_22 AC 234 ms
61,216 KB
testcase_23 AC 239 ms
61,088 KB
testcase_24 AC 236 ms
60,980 KB
testcase_25 AC 239 ms
61,044 KB
testcase_26 AC 240 ms
60,892 KB
testcase_27 AC 240 ms
61,884 KB
testcase_28 AC 236 ms
60,884 KB
testcase_29 AC 236 ms
60,892 KB
testcase_30 AC 236 ms
61,644 KB
testcase_31 AC 234 ms
61,696 KB
testcase_32 AC 238 ms
61,248 KB
testcase_33 AC 240 ms
61,336 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    static int[] counts = new int[]{20104, 20063, 19892, 20011, 19874, 20199, 19898, 20163, 19956, 19841};
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        for (char c : sc.next().toCharArray()) {
            if (c == '.') {
                continue;
            }
            counts[c - '0']--;
        }
        int left = 0;
        int right = 0;
        for (int i = 0; i < counts.length; i++) {
            if (counts[i] == -1) {
                left = i;
            } else if (counts[i] == 1) {
                right = i;
            }
        }
        System.out.println(left + " " + right);
    }
}
0