結果
| 問題 | No.3685 ワロングアンサーやんけ! |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-09-08 13:09:31 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 555 bytes |
| 記録 | |
| コンパイル時間 | 235 ms |
| コンパイル使用メモリ | 81,108 KB |
| 実行使用メモリ | 84,832 KB |
| 最終ジャッジ日時 | 2026-09-08 13:09:41 |
| 合計ジャッジ時間 | 4,990 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 16 WA * 16 |
ソースコード
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 former.count("A") != K:
print(R)
else:
# 全てA
print("A" * len(R))
for _ in range(int(input())):
solve()