ผลทดสอบ บ้าบอ

1, 2, traffy (3), 4, nectec (5), traffy (6), nstda (7), 8, traffy (9), nectec (10), 11, traffy (12), traffy (13), nstda (14), traffy nectec nectec (15), 16, nstda (17), traffy (18), 19, nectec (20), traffy nstda (21), 22, traffy (23), traffy (24), nectec nectec (25), 26, traffy nstda (27), nstda (28), 29, traffy nectec traffy (30), traffy (31), traffy (32), traffy traffy traffy (33), traffy (34), nectec nstda traffy nectec (35), traffy traffy (36), traffy nstda (37), traffy (38), traffy traffy (39), nectec (40), 41, traffy nstda (42), traffy (43), 44, traffy nectec nectec (45), 46, nstda (47), traffy (48), nstda (49), nectec nectec (50), traffy nectec (51), nectec (52), nectec traffy (53), traffy nectec (54), nectec nectec nectec (55), nstda nectec (56), traffy nectec nstda (57), nectec (58), nectec (59), traffy nectec (60), 61, 62, traffy nstda traffy (63), 64, nectec nectec (65), traffy (66), nstda (67), 68, traffy (69), nectec nstda nstda (70), nstda (71), traffy nstda (72), nstda traffy (73), nstda (74), traffy nectec nstda nectec (75), nstda (76), nstda nstda nstda (77), traffy nstda (78), nstda (79), nectec (80), traffy (81), 82, traffy (83), traffy nstda (84), nectec nectec (85), 86, traffy nstda (87), 88, 89, traffy nectec (90), nstda (91), 92, traffy traffy (93), 94, nectec nectec (95), traffy (96), nstda (97), nstda (98), traffy (99), nectec (100)

def printText(text,pt):
	p = 'T'
	for j in text:
		if j == '3':
			p = 'F'
			print 'traffy',
		elif j == '5':
			p = 'F'
			print 'nectec',
		elif j == '7':
			p = 'F'
			print 'nstda',
	if p =='T'and pt=='T' and text!='100':
		print ''+text+',',
	elif pt == 'F'and p == 'T' and text!='100':
		print '('+text+'),',
	elif p =='F' and pt=='T' and text!='100':
		print '('+text+'),',
	elif p=='F' and pt=='F' and text!='100':
		print '('+text+'),',
	elif text=='100':
		print '('+text+')',
for i in range(1,101):
	pt = 'T'
	# print i,'====>',
	if i%3==0 and i%5==0 and i%7 ==0:
		print 'traffy nectec nstda',
		pt = 'F'
		text = str(i)
		pt = 'F'
		printText(text,pt);
		# print '('+text+'),',
	elif i%3==0 and i%5==0:
		print 'traffy nectec',
		pt = 'F'
		text = str(i)
		printText(text,pt);
		# print '('+text+'),',
	elif i%3==0 and i%7 ==0:
		print 'traffy nstda',
		pt = 'F'
		text = str(i)
		printText(text,pt);
		# print '('+text+'),',
	elif i%7==0 and i%5==0:
		print 'nectec nstda',
		pt = 'F'
		text = str(i)
		printText(text,pt);
		# print '('+text+'),',
	elif i%3==0:
		print 'traffy',
		pt = 'F'
		text = str(i)
		if len(text)!=1:
			printText(text,pt);
		else:
			print '('+str(i)+'),',
	elif i%5==0:
		print 'nectec',
		pt = 'F'
		text = str(i)
		if len(text)!=1:
			printText(text,pt);
		else:
			print '('+str(i)+'),',
	elif i%7==0:
		print 'nstda',
		pt = 'F'
		text = str(i)
		if len(text)!=1:
			printText(text,pt);
		else:
			print '('+str(i)+'),',
	else:
		text = str(i)
		if len(text)!=1:
			printText(text,pt);
		else:
			print ''+str(i)+',',