結果

問題 No.171 スワップ文字列(Med)
ユーザー noko2250noko2250
提出日時 2015-03-23 18:21:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 19 ms / 1,000 ms
コード長 294 bytes
コンパイル時間 85 ms
コンパイル使用メモリ 10,476 KB
実行使用メモリ 8,620 KB
最終ジャッジ日時 2023-09-11 09:45:34
合計ジャッジ時間 1,137 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
8,620 KB
testcase_01 AC 19 ms
8,508 KB
testcase_02 AC 18 ms
8,584 KB
testcase_03 AC 18 ms
8,580 KB
testcase_04 AC 18 ms
8,444 KB
testcase_05 AC 18 ms
8,456 KB
testcase_06 AC 18 ms
8,528 KB
testcase_07 AC 18 ms
8,476 KB
testcase_08 AC 18 ms
8,460 KB
testcase_09 AC 19 ms
8,564 KB
testcase_10 AC 18 ms
8,452 KB
testcase_11 AC 19 ms
8,440 KB
testcase_12 AC 18 ms
8,456 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/c/Python34/python
# coding: utf-8
from collections import Counter
from math import factorial


def main():
    S = input()
    C = Counter(S)

    ans = factorial(len(S))
    for c in C.values():
        ans //= factorial(c)

    print((ans-1) % 573)


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