#11915: Py Ans.


manhong2112 (飄夢)

學校 : 香港專業教育學院 (IVE)
編號 : 47195
來源 : [123.203.0.202]
最後登入時間 :
2020-02-25 07:16:36
a058. MOD3 | From: [119.246.237.208] | 發表日期 : 2017-04-19 16:15

import sys
inp = []
for s in sys.stdin:
   inp.append(int(s))
inp.pop(0)
print(len(list(filter(lambda x: x%3 == 0, inp))), end=" ")
print(len(list(filter(lambda x: x%3 == 1, inp))), end=" ")
print(len(list(filter(lambda x: x%3 == 2, inp))), end=" ")

python做題好簡單...java貌似也能做到這些

 
ZeroJudge Forum