結果
| 問題 |
No.170 スワップ文字列(Easy)
|
| コンテスト | |
| ユーザー |
rocoder
|
| 提出日時 | 2017-08-12 13:39:34 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 323 bytes |
| コンパイル時間 | 108 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 10,624 KB |
| 最終ジャッジ日時 | 2024-10-13 04:50:29 |
| 合計ジャッジ時間 | 1,621 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 21 |
ソースコード
# your code goes here
#swap
S=list(input())
S.sort()
i=0
k=1
l=1
while i<len(S)-1:
if S[i]==S[i+1]:
k*=2
j=2
i+=1
l*=i
while i<len(S)-1 and S[i]==S[i+1]:
j+=1
k*=j
i+=1
l*=i
else:
i+=1
l*=i
i+=1
l*=i
print(l//k)
rocoder