結果

問題 No.170 スワップ文字列(Easy)
コンテスト
ユーザー togatoga
提出日時 2015-04-07 10:18:58
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 87 ms / 5,000 ms
コード長 178 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 405 ms
コンパイル使用メモリ 77,628 KB
最終ジャッジ日時 2025-12-03 14:35:40
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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