結果
| 問題 |
No.170 スワップ文字列(Easy)
|
| コンテスト | |
| ユーザー |
yaoshimax
|
| 提出日時 | 2015-03-26 09:34:50 |
| 言語 | Python2 (2.7.18) |
| 結果 |
AC
|
| 実行時間 | 13 ms / 5,000 ms |
| コード長 | 224 bytes |
| コンパイル時間 | 415 ms |
| コンパイル使用メモリ | 6,820 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2024-12-23 00:19:38 |
| 合計ジャッジ時間 | 1,455 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
S=raw_input()
cnt=[0 for i in range(26)]
fact=[1 for i in range(9)]
for i in range(1,9):
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
yaoshimax