結果

問題 No.170 スワップ文字列(Easy)
ユーザー lllllll88938494lllllll88938494
提出日時 2023-06-03 20:41:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 93 ms / 5,000 ms
コード長 204 bytes
コンパイル時間 282 ms
コンパイル使用メモリ 87,216 KB
実行使用メモリ 71,844 KB
最終ジャッジ日時 2023-08-28 08:03:03
合計ジャッジ時間 3,720 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
71,816 KB
testcase_01 AC 91 ms
71,788 KB
testcase_02 AC 88 ms
71,412 KB
testcase_03 AC 93 ms
71,564 KB
testcase_04 AC 90 ms
71,612 KB
testcase_05 AC 89 ms
71,784 KB
testcase_06 AC 88 ms
71,556 KB
testcase_07 AC 89 ms
71,732 KB
testcase_08 AC 89 ms
71,604 KB
testcase_09 AC 89 ms
71,812 KB
testcase_10 AC 88 ms
71,692 KB
testcase_11 AC 88 ms
71,368 KB
testcase_12 AC 89 ms
71,612 KB
testcase_13 AC 89 ms
71,668 KB
testcase_14 AC 91 ms
71,696 KB
testcase_15 AC 90 ms
71,412 KB
testcase_16 AC 89 ms
71,612 KB
testcase_17 AC 89 ms
71,416 KB
testcase_18 AC 88 ms
71,624 KB
testcase_19 AC 91 ms
71,576 KB
testcase_20 AC 90 ms
71,572 KB
testcase_21 AC 89 ms
71,676 KB
testcase_22 AC 90 ms
71,372 KB
testcase_23 AC 90 ms
71,844 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict
from math import factorial as f
s=input()
dic=defaultdict(int)
for i in s:
    dic[i] += 1

a = f(len(s))
b = 1
for i in set(list(s)):
    b*=f(dic[i])

print(a//b - 1)
0