QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#209008 | #5680. You You See What? | legendarysas | WA | 10ms | 8008kb | Python3 | 425b | 2023-10-10 02:08:59 | 2023-10-10 02:08:59 |
Judging History
answer
import sys
input = sys.stdin.readline
if __name__ == "__main__":
bangs = input().split("!")
skips = {}
for i in range(len(bangs)):
skips[bangs[i].lower()] = i
final = []
i = 0
while i < len(bangs):
final.append(bangs[i])
if skips[bangs[i].lower()] > i:
i = skips[bangs[i].lower()]
i += 1
print("!".join(final))
# print(skips)
# print(bangs)
詳細信息
Test #1:
score: 100
Accepted
time: 10ms
memory: 7916kb
input:
texasam!rice!baylor!csdept!baylor!rice!dev!bresearch!bpoucher
output:
texasam!rice!dev!bresearch!bpoucher
result:
ok single line: 'texasam!rice!dev!bresearch!bpoucher'
Test #2:
score: -100
Wrong Answer
time: 5ms
memory: 8008kb
input:
texasam!Rice!baYlor!csdept!BayloR!dev!Rice!bresearch!bpoucher
output:
texasam!Rice!bresearch!bpoucher
result:
wrong answer 1st lines differ - expected: 'texasam!Rice!baYlor!dev!Rice!bresearch!bpoucher', found: 'texasam!Rice!bresearch!bpoucher'