結果

問題 No.672 最長AB列
ユーザー eCLHfCBrUzbcj3weCLHfCBrUzbcj3w
提出日時 2018-12-02 12:01:38
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 225 bytes
コンパイル時間 108 ms
コンパイル使用メモリ 10,644 KB
実行使用メモリ 9,784 KB
最終ジャッジ日時 2023-09-11 00:01:17
合計ジャッジ時間 1,933 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 15 ms
7,784 KB
testcase_02 RE -
testcase_03 RE -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 RE -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

line = list(input())
l_dic = {}

for i in line:
    if i in l_dic:
        l_dic[i] +=1
    else:
        l_dic[i] =1

a = l_dic["A"]
b = l_dic["B"]

if a ==0 or b ==0:
    print(0)
elif a > b:
    print(b)
else:
    print(a)
0