結果
| 問題 | No.559 swapAB列 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-09-25 10:35:17 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0) |
| 結果 |
AC
|
| 実行時間 | 94 ms / 2,000 ms |
| + 912µs | |
| コード長 | 208 bytes |
| 記録 | |
| コンパイル時間 | 968 ms |
| コンパイル使用メモリ | 21,208 KB |
| 実行使用メモリ | 15,660 KB |
| 最終ジャッジ日時 | 2026-09-01 21:40:49 |
| 合計ジャッジ時間 | 3,239 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 |
ソースコード
s=list(input())
cnt=0
while True:
try:
s=s[s.index('B'):]
an=s.index('A')
bn=s.index('B')
s[an]='B'
s[an-1]='A'
cnt+=1
except:
break
print(cnt)