1626: 【12】统计数据▃
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:10
Solved:9
Description
给定n个正整数,请统计其中是3或者是7的倍数的数的个数。
Input
第一行,一个正整数n(1≤n≤50)。
第二行,n个正整数(1≤正整数≤500),相邻两个数之间用一个空格分开。
提示:
s = input() #输入一个字符串,赋值给s。
a = s.split(' ') #将字符串s按空格拆分,保存到列表a中。
lis = [int(i) for i in a] #将列表a的元素转换成整数,保存到列表lis中。
Output
一个整数,表示是3或者是7的倍数的数的个数。
Sample Input Copy
8
5 7 2 14 9 12 21 6
Sample Output Copy
6