COLT– EDITORIAL

PROBLEM LINKS:

Practice

Contest

Author:

bigo_admin

Tester and Editorialist:

subhasis10

DIFFICULTY:

CAKEWALK

PREREQUISITES:

Array

PROBLEM:

Given an array of integers [A1,A2,…An], you need to find number of elements which not divisible by 3 and 5 or divisible by both 3 and 5 .

EXPLANATION:

We traverse through the whole array of N integers and maintain a counter. For every integer divisible by 3 or 5 we increment the counter and if the same integer is divisible by both 3 and 5 we decrement the counter. At the end of traversal we print (N-counter).

TESTER’S SOLUTION:

Can be found here

//