結果

問題 No.170 スワップ文字列(Easy)
ユーザー PalearcticPalearctic
提出日時 2018-09-18 19:38:40
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 16 ms / 5,000 ms
コード長 264 bytes
コンパイル時間 564 ms
コンパイル使用メモリ 10,896 KB
実行使用メモリ 7,932 KB
最終ジャッジ日時 2023-09-25 09:53:32
合計ジャッジ時間 1,828 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,816 KB
testcase_01 AC 16 ms
7,780 KB
testcase_02 AC 15 ms
7,808 KB
testcase_03 AC 15 ms
7,824 KB
testcase_04 AC 15 ms
7,916 KB
testcase_05 AC 15 ms
7,788 KB
testcase_06 AC 16 ms
7,760 KB
testcase_07 AC 16 ms
7,840 KB
testcase_08 AC 15 ms
7,816 KB
testcase_09 AC 15 ms
7,808 KB
testcase_10 AC 15 ms
7,916 KB
testcase_11 AC 15 ms
7,856 KB
testcase_12 AC 15 ms
7,896 KB
testcase_13 AC 15 ms
7,884 KB
testcase_14 AC 15 ms
7,912 KB
testcase_15 AC 16 ms
7,812 KB
testcase_16 AC 15 ms
7,788 KB
testcase_17 AC 15 ms
7,844 KB
testcase_18 AC 15 ms
7,872 KB
testcase_19 AC 15 ms
7,916 KB
testcase_20 AC 15 ms
7,864 KB
testcase_21 AC 15 ms
7,856 KB
testcase_22 AC 15 ms
7,824 KB
testcase_23 AC 15 ms
7,932 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

S=input()

def fct(i):
    if(i==0):
        return 1
    else:
        return i*fct(i-1)
    
d={}
for i in range(65,65+26):
    d[chr(i)]=0
for s in S:
    d[s]+=1
    
cal=1
for i in d.values():
    if(i!=0):
        cal*=fct(i)

print(int((fct(len(S))/cal)-1))
0