結果

問題 No.559 swapAB列
ユーザー dango
提出日時 2023-06-06 20:24:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 42 ms / 2,000 ms
コード長 126 bytes
コンパイル時間 324 ms
コンパイル使用メモリ 82,340 KB
実行使用メモリ 52,096 KB
最終ジャッジ日時 2024-12-29 08:44:53
合計ジャッジ時間 1,284 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

S = input()
count = 0
num_B = 0
for c in S:
    if c == 'B':
        num_B += 1
    else:
        count += num_B
print(count)
0