結果

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

ソースコード

diff #

import math

S = raw_input()

tmp = [0] * 26
for x in S:
    tmp[ord(x) - ord("A")] += 1

ans = math.factorial(len(S))

for i in tmp:
    ans /= math.factorial(i)

print ans - 1
0