結果

問題 No.171 スワップ文字列(Med)
ユーザー yaoshimax
提出日時 2015-03-26 09:39:41
言語 Python2
(2.7.18)
結果
AC  
実行時間 13 ms / 1,000 ms
コード長 236 bytes
コンパイル時間 426 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 6,912 KB
最終ジャッジ日時 2024-06-29 01:00:21
合計ジャッジ時間 1,172 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

S=raw_input()
cnt=[0 for i in range(26)]
fact=[1 for i in range(1001)]
for i in range(1,1001):
    fact[i]=fact[i-1]*i
for s in S:
    cnt[ord(s)-ord('A')]+=1
ans=fact[len(S)]
for i in range(26):
    ans/=fact[cnt[i]]
print (ans-1)%573
0