結果

問題 No.170 スワップ文字列(Easy)
コンテスト
ユーザー roiti46
提出日時 2015-03-22 23:26:26
言語 PyPy2
(7.3.15)
結果
RE  
実行時間 -
コード長 232 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 119 ms
コンパイル使用メモリ 77,480 KB
最終ジャッジ日時 2025-12-03 14:29:16
ジャッジサーバーID
(参考情報)
judge3 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 RE * 2
other AC * 10 RE * 11
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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