結果
| 問題 | No.3685 ワロングアンサーやんけ! |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-09-08 13:17:45 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 698 bytes |
| 記録 | |
| コンパイル時間 | 64 ms |
| コンパイル使用メモリ | 81,712 KB |
| 実行使用メモリ | 84,864 KB |
| 最終ジャッジ日時 | 2026-09-08 13:17:55 |
| 合計ジャッジ時間 | 5,570 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 19 WA * 13 |
ソースコード
def solve():
R = input().strip()
wrong = input().strip() == "Warong"
K = int(input())
if wrong:
# AAAA...AAA
latter = R[K:]
q_ct = latter.count("?")
w_ct = latter.count("W")
if q_ct == 1 and w_ct == 0: latter.replace("?", "W")
print(R[:K].replace("?", "A") + latter)
else:
former = R[:K]
latter = R[K:]
if latter.count("W") > 0 and former.count("?") == 1 and former.count("W") == 0:
print(former.replace("?", "W") + latter)
elif former.count("A") != K:
print(R)
else:
# 全てA
print("A" * len(R))
for _ in range(int(input())):
solve()