Tester and Editorialist:
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 .
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).
Can be found here