import sys def validate(name): if not name: return False n = len(name) if name[0] < 'A'&nbs***bsp;name[0] > 'z': return False num, ch = False, False for i in range(n): if name[i] < '0'&nbs***bsp;'9' < name[i] < 'A'&nbs***bsp;name[0] > 'z': return False if '0' <= name[i] <= '9': num = True if 'A' <= name[i] <= 'z': ch = True return ch and num n = int(input().strip()) #n = int(sys.stdin.readline().strip()) for _ in range(n): name = str(input().strip()) #print (name) if validate(name): print ('Accept') #sys.stdout.write('Accept') else: print ('Wrong') #sys.stdout.write('Wrong')
我真的服了赛码网 克我 总是只能过18% 人晕了
全部评论
(19) 回帖