結果

問題 No.170 スワップ文字列(Easy)
ユーザー gahou
提出日時 2016-11-02 14:28:19
言語 Python2
(2.7.18)
結果
AC  
実行時間 12 ms / 5,000 ms
コード長 206 bytes
コンパイル時間 68 ms
コンパイル使用メモリ 6,784 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2024-12-23 00:44:28
合計ジャッジ時間 1,163 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

s=raw_input()
lst={}
for i in xrange(len(s)):
  if s[i] not in lst: lst[s[i]] = 1
  else: lst[s[i]]+=1
ans = math.factorial(len(s))
for i in lst.values():
  ans /= math.factorial(i)
print ans-1
0