結果
問題 | No.170 スワップ文字列(Easy) |
ユーザー |
|
提出日時 | 2016-04-11 09:03:30 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 15 ms / 5,000 ms |
コード長 | 271 bytes |
コンパイル時間 | 160 ms |
コンパイル使用メモリ | 6,912 KB |
実行使用メモリ | 6,912 KB |
最終ジャッジ日時 | 2024-12-23 00:37:06 |
合計ジャッジ時間 | 1,319 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
#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