結果

問題 No.171 スワップ文字列(Med)
ユーザー むらためむらため
提出日時 2019-01-19 15:44:08
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 240 bytes
コンパイル時間 494 ms
コンパイル使用メモリ 10,656 KB
実行使用メモリ 7,948 KB
最終ジャッジ日時 2023-09-24 23:22:59
合計ジャッジ時間 1,108 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,768 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 16 ms
7,948 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 19 ms
7,948 KB
testcase_09 AC 19 ms
7,772 KB
testcase_10 WA -
testcase_11 AC 15 ms
7,856 KB
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

S = input()
I = dict()
for s in S:
    I[s] = I.get(s, 0) + 1
A = []
for k, v in I.items():
    A.append(v)
ans = 1
for i in range(1, sum(A)):
    ans *= i
for a in A:
    for i in range(1, a):
        ans = ans // i
print((ans - 1) % 573)
0