Solution for Codechef INTEST | Enormous Input Test

Hello Programmers,

The solution for codechef Enormous Input Test problem is given below.

Problem Link:- https://www.codechef.com/problems/INTEST

/*
*   Author:- Rahul Malhotra
*   Source:- Programming Vidya
*   Description:- Solution for Codechef Enormous Input Test problem
*   Problem Link:- https://www.codechef.com/problems/INTEST
*   Website:- www.programmingvidya.com
*/

#include<iostream>
#include<stdio.h>

using namespace std;

int main()
{
    // * Initializing variables
    int count=0;
    unsigned int n,k;

    // * Accepting the input
    cin>>n>>k;

    // * Accepting each integer one by one
    while(n--)
    {
        unsigned long int t;
        cin>>t;

        // * If current integer is divisible by k, increment count by 1
        if(t%k==0)
        {
            count++;
        }
    }

    // * Displaying the count
    cout<<count;
    return 0;
}

Happy Coding..!!

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s