結果

問題 No.170 スワップ文字列(Easy)
ユーザー あかりきあかりき
提出日時 2021-03-01 18:54:04
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 89 ms / 5,000 ms
コード長 216 bytes
コンパイル時間 373 ms
コンパイル使用メモリ 86,676 KB
実行使用メモリ 71,816 KB
最終ジャッジ日時 2023-07-26 13:46:02
合計ジャッジ時間 3,757 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
71,680 KB
testcase_01 AC 84 ms
71,480 KB
testcase_02 AC 82 ms
71,756 KB
testcase_03 AC 89 ms
71,648 KB
testcase_04 AC 84 ms
71,772 KB
testcase_05 AC 85 ms
71,388 KB
testcase_06 AC 85 ms
71,520 KB
testcase_07 AC 84 ms
71,484 KB
testcase_08 AC 84 ms
71,588 KB
testcase_09 AC 84 ms
71,676 KB
testcase_10 AC 85 ms
71,788 KB
testcase_11 AC 80 ms
71,752 KB
testcase_12 AC 82 ms
71,256 KB
testcase_13 AC 82 ms
71,520 KB
testcase_14 AC 83 ms
71,680 KB
testcase_15 AC 83 ms
71,600 KB
testcase_16 AC 82 ms
71,588 KB
testcase_17 AC 81 ms
71,816 KB
testcase_18 AC 85 ms
71,392 KB
testcase_19 AC 83 ms
71,612 KB
testcase_20 AC 84 ms
71,696 KB
testcase_21 AC 82 ms
71,440 KB
testcase_22 AC 85 ms
71,516 KB
testcase_23 AC 86 ms
71,496 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections
s=list(input())
c=collections.Counter(s)
l=list(c.values())
fact=[1,1]
for i in range(2,len(s)+1):
  fact.append(fact[-1]*i)
ans=fact[len(s)]
for i in range(len(l)):
  ans//=fact[l[i]]
print(ans-1)
0