結果

問題 No.559 swapAB列
ユーザー el_2el_2
提出日時 2020-05-03 08:32:38
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 32 ms / 2,000 ms
コード長 117 bytes
コンパイル時間 264 ms
コンパイル使用メモリ 12,288 KB
実行使用メモリ 10,112 KB
最終ジャッジ日時 2025-01-03 08:29:12
合計ジャッジ時間 1,454 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

S = input()
N = len(S)

ans = 0
for i, s in enumerate(S):
    if s == 'B':
        ans += S[i:].count('A')
print(ans)
0