結果

問題 No.170 スワップ文字列(Easy)
ユーザー roiti46roiti46
提出日時 2015-03-22 23:26:26
言語 Python2
(2.7.18)
結果
RE  
実行時間 -
コード長 232 bytes
コンパイル時間 531 ms
コンパイル使用メモリ 6,716 KB
実行使用メモリ 6,080 KB
最終ジャッジ日時 2023-09-11 09:30:47
合計ジャッジ時間 1,888 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 AC 11 ms
5,960 KB
testcase_03 AC 12 ms
5,872 KB
testcase_04 AC 11 ms
5,952 KB
testcase_05 RE -
testcase_06 AC 11 ms
5,860 KB
testcase_07 RE -
testcase_08 AC 11 ms
5,936 KB
testcase_09 AC 11 ms
6,080 KB
testcase_10 RE -
testcase_11 RE -
testcase_12 AC 11 ms
5,936 KB
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 AC 11 ms
5,960 KB
testcase_19 AC 11 ms
6,080 KB
testcase_20 RE -
testcase_21 RE -
testcase_22 AC 11 ms
6,076 KB
testcase_23 AC 11 ms
5,932 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def fact(n):
    res = 1
    while n > 0:
        res *= n
        n -= 1
    return res
    
S = raw_input()
hist = [0]*26
for s in S:
    hist[ord(s)-ord("a")] += 1
ans = fact(len(S))
for i in hist:
    ans /= fact(i)
print ans-1
0