結果

問題 No.171 スワップ文字列(Med)
ユーザー imulan
提出日時 2016-06-20 18:21:30
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 31 ms / 1,000 ms
コード長 195 bytes
コンパイル時間 237 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-10-11 17:18:56
合計ジャッジ時間 1,476 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

s=input()

ct=[0 for i in range(26)]
for c in s:
    ct[ord(c)-ord('A')]+=1

ans=math.factorial(len(s))
for i in range(26):
    ans=ans//math.factorial(ct[i])
ans-=1

print(ans%573)
0