結果

問題 No.171 スワップ文字列(Med)
ユーザー roiti46roiti46
提出日時 2015-03-22 23:28:36
言語 Python2
(2.7.18)
結果
AC  
実行時間 12 ms / 1,000 ms
コード長 238 bytes
コンパイル時間 99 ms
コンパイル使用メモリ 6,784 KB
実行使用メモリ 6,144 KB
最終ジャッジ日時 2024-06-29 00:10:50
合計ジャッジ時間 822 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

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)%573
0