結果
問題 |
No.559 swapAB列
|
ユーザー |
|
提出日時 | 2018-01-08 23:53:00 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 249 bytes |
コンパイル時間 | 99 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-12-23 12:33:13 |
合計ジャッジ時間 | 1,180 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 4 WA * 3 |
ソースコード
s=list(input()) count=0 for i in range(len(s)): if s[i]=="B": for j in range(1,len(s)-i): if s[i+j]=="A": s[i+j],s[i+j-1]=s[i+j-1],s[i+j] count+=1 print(count)