結果

問題 No.2629 A replace B replace C
ユーザー 👑 rin204rin204
提出日時 2024-02-18 17:37:21
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 258 bytes
コンパイル時間 302 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 75,700 KB
最終ジャッジ日時 2024-02-18 17:37:28
合計ジャッジ時間 6,226 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 50 ms
75,660 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 44 ms
73,540 KB
testcase_09 AC 47 ms
75,204 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 48 ms
75,208 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 49 ms
75,192 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 49 ms
75,204 KB
testcase_22 AC 46 ms
72,124 KB
testcase_23 AC 52 ms
75,192 KB
testcase_24 AC 52 ms
75,184 KB
testcase_25 AC 46 ms
73,412 KB
testcase_26 AC 45 ms
72,124 KB
testcase_27 AC 43 ms
72,132 KB
testcase_28 AC 50 ms
75,192 KB
testcase_29 AC 48 ms
72,124 KB
testcase_30 AC 41 ms
68,032 KB
testcase_31 AC 49 ms
75,336 KB
testcase_32 AC 47 ms
75,196 KB
testcase_33 AC 48 ms
75,700 KB
testcase_34 AC 48 ms
75,204 KB
testcase_35 AC 54 ms
75,192 KB
testcase_36 AC 49 ms
75,612 KB
testcase_37 AC 48 ms
75,332 KB
testcase_38 AC 48 ms
75,320 KB
testcase_39 AC 45 ms
75,196 KB
testcase_40 AC 48 ms
75,320 KB
testcase_41 AC 44 ms
72,120 KB
testcase_42 AC 47 ms
75,204 KB
testcase_43 AC 47 ms
73,412 KB
testcase_44 AC 47 ms
75,184 KB
testcase_45 AC 48 ms
75,332 KB
testcase_46 AC 48 ms
75,624 KB
testcase_47 AC 46 ms
75,196 KB
testcase_48 AC 42 ms
72,128 KB
testcase_49 AC 41 ms
72,120 KB
testcase_50 AC 48 ms
75,204 KB
testcase_51 AC 44 ms
72,516 KB
testcase_52 AC 41 ms
72,616 KB
testcase_53 AC 38 ms
65,832 KB
testcase_54 AC 38 ms
67,880 KB
testcase_55 AC 37 ms
67,880 KB
testcase_56 AC 37 ms
65,836 KB
testcase_57 AC 43 ms
73,144 KB
testcase_58 AC 39 ms
67,880 KB
testcase_59 AC 51 ms
75,208 KB
testcase_60 AC 42 ms
71,984 KB
testcase_61 AC 36 ms
53,460 KB
testcase_62 AC 31 ms
53,460 KB
testcase_63 AC 29 ms
53,460 KB
testcase_64 WA -
testcase_65 AC 29 ms
53,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
S = input()
T = input()
f = False
ab = 0
bc = 0
for s, t in zip(S, T):
    if s == "A" and t == "B":
        ab += 1
    elif s == "B" and t == "C":
        bc += 1
        f = True

if f and ab == bc:
    print("Yes")
else:
    print("No")
0