結果

問題 No.313 π
ユーザー はむ吉🐹はむ吉🐹
提出日時 2015-12-07 17:22:14
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 43 ms / 5,000 ms
コード長 678 bytes
コンパイル時間 123 ms
コンパイル使用メモリ 10,788 KB
実行使用メモリ 9,456 KB
最終ジャッジ日時 2023-10-12 20:05:46
合計ジャッジ時間 3,054 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
9,352 KB
testcase_01 AC 42 ms
9,304 KB
testcase_02 AC 41 ms
9,412 KB
testcase_03 AC 41 ms
9,408 KB
testcase_04 AC 42 ms
9,352 KB
testcase_05 AC 41 ms
9,372 KB
testcase_06 AC 42 ms
9,248 KB
testcase_07 AC 41 ms
9,324 KB
testcase_08 AC 41 ms
9,228 KB
testcase_09 AC 41 ms
9,456 KB
testcase_10 AC 41 ms
9,368 KB
testcase_11 AC 42 ms
9,376 KB
testcase_12 AC 41 ms
9,340 KB
testcase_13 AC 41 ms
9,412 KB
testcase_14 AC 41 ms
9,372 KB
testcase_15 AC 42 ms
9,416 KB
testcase_16 AC 41 ms
9,296 KB
testcase_17 AC 43 ms
9,324 KB
testcase_18 AC 41 ms
9,280 KB
testcase_19 AC 41 ms
9,232 KB
testcase_20 AC 41 ms
9,280 KB
testcase_21 AC 41 ms
9,348 KB
testcase_22 AC 41 ms
9,256 KB
testcase_23 AC 41 ms
9,428 KB
testcase_24 AC 41 ms
9,348 KB
testcase_25 AC 41 ms
9,324 KB
testcase_26 AC 40 ms
9,288 KB
testcase_27 AC 40 ms
9,372 KB
testcase_28 AC 43 ms
9,268 KB
testcase_29 AC 41 ms
9,348 KB
testcase_30 AC 42 ms
9,352 KB
testcase_31 AC 43 ms
9,308 KB
testcase_32 AC 41 ms
9,376 KB
testcase_33 AC 42 ms
9,280 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import collections
import string

PI200K = {'0': 20104,
          '1': 20063,
          '2': 19892,
          '3': 20011,
          '4': 19874,
          '5': 20199,
          '6': 19898,
          '7': 20163,
          '8': 19956,
          '9': 19841}


def compare_strings(wrong, correct=PI200K):
    wrong_counter = collections.Counter(wrong)
    for d in string.digits:
        if PI200K[d] < wrong_counter[d]:
            before = d
        elif PI200K[d] > wrong_counter[d]:
            after = d
    return [before, after]


def main():
    print(" ".join(compare_strings(input())))

if __name__ == "__main__":
    main()
0