結果

問題 No.559 swapAB列
ユーザー nebukuro09nebukuro09
提出日時 2017-08-25 22:29:33
言語 Python2
(2.7.18)
結果
AC  
実行時間 12 ms / 2,000 ms
コード長 175 bytes
コンパイル時間 301 ms
コンパイル使用メモリ 6,668 KB
実行使用メモリ 6,072 KB
最終ジャッジ日時 2023-08-05 18:50:39
合計ジャッジ時間 826 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
5,908 KB
testcase_01 AC 11 ms
5,892 KB
testcase_02 AC 11 ms
5,896 KB
testcase_03 AC 12 ms
6,072 KB
testcase_04 AC 10 ms
5,940 KB
testcase_05 AC 12 ms
6,016 KB
testcase_06 AC 11 ms
5,976 KB
testcase_07 AC 11 ms
5,824 KB
testcase_08 AC 10 ms
5,820 KB
testcase_09 AC 10 ms
5,848 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

S = raw_input()
ans = 0
for i in xrange(len(S)):
    if S[i] == 'A':
        continue
    for j in xrange(i+1, len(S)):
        if S[j] == 'A':
            ans += 1
print ans
0