結果

問題 No.171 スワップ文字列(Med)
ユーザー fmhrfmhr
提出日時 2015-03-23 01:12:25
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 19 ms / 1,000 ms
コード長 213 bytes
コンパイル時間 92 ms
コンパイル使用メモリ 10,596 KB
実行使用メモリ 8,548 KB
最終ジャッジ日時 2023-09-11 09:42:05
合計ジャッジ時間 1,117 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

from collections import Counter
from math import factorial

s = input()
c = Counter(s)

n = []
for v in c.values():
    n.append(v)

a = 1
for x in n:
    a *= factorial(x)

print((((factorial(len(s))-1)//a)%573))
0