HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Repetition (Loops) > problem:


50957 - Divisible by 3

Volume problems

• 50897 - Prime Number
• 50901 - Sum of Cubes-1
• 50957 - Divisible by 3
• 50898 - Draw the Pattern
• 50896 - Sum of Even Numbers
• 51115 - Pascal Triangle
• 51116 - The Star Triangle
• 50303 - Pattern
• 50882 - FizzBuzz
• 50308 - IT Knowledge Seminars
• 50312 - Sales Bar Chart

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.

Divisible by 3

 

Write a program that gets N numbers and then counts and displays the number of numbers which are divisible by 3.


Input specification:

In the first line you will get an integer number N where 1 ≤ N ≤ 5000.

In the following line you will get N integer numbers separated by space.

 

Output specification:
Show the number of numbers which are divisible by 3.

 

Sample Input I   

Sample Input II  

4

6 4 3 5

5

2 7 5 11 19

Sample Output I   

Sample Output II

2

0

 

Для отправки решений необходимо выполнить вход.

www.contester.ru