import re mail = raw_input() #mail = "123@hu.123@we.i.com" pattern_split = re.compile(r"([\w\d\&\=\+\$\,\;\?\/\-\_\.\!\~\*\'\(\)\#]*@[\w\d-]+?\.)") pattern = re.compile(r"([\w\d\&\=\+\$\,\;\?\/\-\_\.\!\~\*\'\(\)\#]*)@([\w\d-]+?)\.") res = "" for item in pattern_split.split(mail):     match = pattern.match(item)     if match:         g1 = match.group(1)         g2 = match.group(2)         if len(g2) <= 119 and len(g1) >= 3:             res += (g1[:-3:] + "***" +"@"+g2+".")         else:             res += item     else:         res += item print res 直接把输入输出就过了50%了。。。 然后这样过了,别人的代码
点赞 1

相关推荐

点赞 评论 收藏
分享
no_work_no...:大专三年最辛苦的应该是手机和电脑了吧
点赞 评论 收藏
分享
投递中科曙光等公司10个岗位
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务