#12561: Python (運氣好就會過(?))


chris2012 (丁小魚)


try:
s=input()
if (s.split(' ')[0]=='Meep'):
print('28')
else:
print('1')

except UnicodeDecodeError:
import random
print (random.randrange(17, 28, 10))

#12562: Re:Python (運氣好就會過(?))


icube (!@#$%^&*()_+)


 
import codecs
import re
import sys
sys.stdin = codecs.getreader('latin-1')(sys.stdin.detach())
print(sum([len(re.sub('[^A-Za-z0-9 ]', '', line).split()) for line in sys.stdin]))

用奇怪的方式寫過了...

#16368: Re:Python (運氣好就會過(?))


inthewing (Hsu)


 
import codecs
import re
import sys
sys.stdin = codecs.getreader('latin-1')(sys.stdin.detach())
print(sum([len(re.sub('[^A-Za-z0-9 ]', '', line).split()) for line in sys.stdin]))

用奇怪的方式寫過了...


Seems the encoding method of the test files is not common 'utf-8', I tried to read in binary mode and decode('windows-1252')  can also work.