結果

問題 No.170 スワップ文字列(Easy)
ユーザー roiti46
提出日時 2015-03-22 23:27:02
言語 Python2
(2.7.18)
結果
AC  
実行時間 11 ms / 5,000 ms
コード長 232 bytes
コンパイル時間 442 ms
コンパイル使用メモリ 6,820 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-23 00:08:07
合計ジャッジ時間 1,486 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

def fact(n):
    res = 1
    while n > 0:
        res *= n
        n -= 1
    return res
    
S = raw_input()
hist = [0]*26
for s in S:
    hist[ord(s)-ord("A")] += 1
ans = fact(len(S))
for i in hist:
    ans /= fact(i)
print ans-1
0