結果

問題 No.170 スワップ文字列(Easy)
ユーザー roiti46
提出日時 2015-03-22 23:26:26
言語 Python2
(2.7.18)
結果
RE  
実行時間 -
コード長 232 bytes
コンパイル時間 411 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-29 00:09:51
合計ジャッジ時間 1,488 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 RE * 2
other AC * 10 RE * 11
権限があれば一括ダウンロードができます

ソースコード

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