main函数里面直接join报错了,改成了: def main(): rres = '' classdic = defaultdict(int) for line in sys.stdin: ip, ym = line.split('~') resprint(ip, ym, classdic) res = [] for key in ['a', 'b', 'c', 'd', 'e', 'wrong', 'private']: res.append(classdic[key]) res_len = len(res) j = 0 for k in res: j += 1 rres += str(k) if(j==res_len):pass else:rres += ' ' print(rres) 然后运行只通过8/10
点赞

相关推荐

2025-12-16 17:17
门头沟学院 产品经理
烤点老白薯:他第二句话的潜台词是想让你帮他点个瑞幸或者喜茶啥的
mt对你说过最有启发的一...
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务