結果

問題 No.171 スワップ文字列(Med)
ユーザー lloyzlloyz
提出日時 2023-06-12 21:57:51
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 103 ms / 1,000 ms
コード長 208 bytes
コンパイル時間 602 ms
コンパイル使用メモリ 87,132 KB
実行使用メモリ 72,404 KB
最終ジャッジ日時 2023-09-02 15:21:45
合計ジャッジ時間 2,848 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 98 ms
71,548 KB
testcase_01 AC 95 ms
71,744 KB
testcase_02 AC 95 ms
71,688 KB
testcase_03 AC 93 ms
71,484 KB
testcase_04 AC 93 ms
71,484 KB
testcase_05 AC 96 ms
71,640 KB
testcase_06 AC 98 ms
71,464 KB
testcase_07 AC 98 ms
71,736 KB
testcase_08 AC 103 ms
72,308 KB
testcase_09 AC 100 ms
72,404 KB
testcase_10 AC 94 ms
71,288 KB
testcase_11 AC 94 ms
71,428 KB
testcase_12 AC 93 ms
71,772 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter

s = input()
n = len(s)
ans = 1
for i in range(1, n + 1):
    ans *= i
for cnt in Counter(s).values():
    for i in range(1, cnt + 1):
        ans //= i
print((ans - 1) % 573)
0