結果
| 問題 |
No.3021 Maximize eval
|
| コンテスト | |
| ユーザー |
sasa8uyauya
|
| 提出日時 | 2025-02-14 21:45:52 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 449 bytes |
| コンパイル時間 | 238 ms |
| コンパイル使用メモリ | 82,404 KB |
| 実行使用メモリ | 96,896 KB |
| 最終ジャッジ日時 | 2025-02-14 21:45:57 |
| 合計ジャッジ時間 | 2,825 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 1 WA * 14 |
ソースコード
T=int(input())
for _ in range(T):
s=list(input())
i=0
while i<len(s):
if s[i]=="-":
i+=1
if s[i]!="?":
pass
else:
s[i]="1"
i+=1
if i<len(s) and s[i]=="?":
if i+1==len(s) or s[i+1]=="+" or s[i+1]=="-":
s[i]="1"
i+=1
else:
s[i]="+"
i+=1
elif s[i]=="?":
s[i]="9"
i+=1
else:
i+=1
print("".join(s))
sasa8uyauya