結果

問題 No.171 スワップ文字列(Med)
ユーザー yaoshimaxyaoshimax
提出日時 2015-03-26 09:39:41
言語 Python2
(2.7.18)
結果
AC  
実行時間 13 ms / 1,000 ms
コード長 236 bytes
コンパイル時間 390 ms
コンパイル使用メモリ 6,564 KB
実行使用メモリ 6,548 KB
最終ジャッジ日時 2023-09-11 10:17:30
合計ジャッジ時間 1,118 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
6,476 KB
testcase_01 AC 13 ms
6,360 KB
testcase_02 AC 12 ms
6,336 KB
testcase_03 AC 12 ms
6,400 KB
testcase_04 AC 12 ms
6,412 KB
testcase_05 AC 13 ms
6,528 KB
testcase_06 AC 13 ms
6,548 KB
testcase_07 AC 13 ms
6,372 KB
testcase_08 AC 12 ms
6,488 KB
testcase_09 AC 12 ms
6,420 KB
testcase_10 AC 12 ms
6,416 KB
testcase_11 AC 12 ms
6,316 KB
testcase_12 AC 13 ms
6,476 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

S=raw_input()
cnt=[0 for i in range(26)]
fact=[1 for i in range(1001)]
for i in range(1,1001):
    fact[i]=fact[i-1]*i
for s in S:
    cnt[ord(s)-ord('A')]+=1
ans=fact[len(S)]
for i in range(26):
    ans/=fact[cnt[i]]
print (ans-1)%573
0