我的代码第一个测试点不能通过,有没有大佬知道的

P1042 [NOIP2003 普及组] 乒乓球

sckb666 @ 2024-12-12 21:04:01

def hhh(fenshu, result_list): w = 0 l = 0 for r in result_list: if r == 'W': w += 1 elif r == 'L': l += 1 if (w >= fenshu or l >= fenshu) and abs(w - l) >= 2: print(f"{w}:{l}") w = 0 l = 0 print(f"{w}:{l}") b = '' while True: a = input() b += a if 'E' in b: break c = [t for t in b if t!= 'E'] hhh(11, c) print() hhh(21, c)


by r4t5y6u7 @ 2024-12-12 21:35:21

这位你可以下载测试点啊(纯属搞笑)


|