Problem3364--周周练-第4周:数组进阶3

3364: 周周练-第4周:数组进阶3

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 6  Solved: 3
[Status] [Submit] [Creator:]

Description

输入n个数字,求这些数中是3的倍数的数的总和。

Input

输入2行,
第一行为一个正整数n,(n<=100)
第二行为n个正整数,每两个数之间用空格隔开。

Output

仅一个数,为n个数字中3的倍数相加的和。

Sample Input Copy

9
11 12 13 14 15 16 17 18 19

Sample Output Copy

45

Source/Category