TOUGHEST - Editorial

PROBLEM LINK:

Practice
Contest

Problem Statement:

We have array on N big positive integers(N<=100, 1<=digits(big int)<=1e5). Find the number of integers in the array which are divisible by 3.

Editorial:

Find sum of digits of the number. Divisibility test by 3 states that for a number to be divisible by 3, its sum of digits should also be divisible by 3.

Time Complexity : O(sum of number of digits in each number)

C++ Solution

//