結果

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

ソースコード

diff #
raw source code

#coding: utf-8
##yuki_170
import math
from collections import Counter

s=raw_input()
counter = Counter(s)
dic=dict(counter)

lv=[]
for k,v in dic.items():
 lv.append(v)

fd=1
for i in xrange(len(lv)):
 fd*=math.factorial(lv[i])

res=math.factorial(len(s))/fd
print res-1
0