INTEST - Enormous Input Test

no tags 

The purpose of this problem is to verify whether the method you are using to read input data is sufficiently fast to handle problems branded with the enormous Input/Output warning. You are expected to be able to process at least 2.5MB of input data per second at runtime.

Input

The input begins with two positive integers n k (n, k<=107). The next n lines of input contain one positive integer ti, not greater than 109, each.

Output

Write a single integer to output, denoting how many integers ti are divisible by k.

Example

Input:
7 3
1
51
966369
7
9
999996
11

Output:
4

hide comments
aj_254: 2019-03-22 12:27:58

1.54 sec python 3 ez AC.

invisible1997: 2019-02-15 05:03:04

0.07 seconds, how do people get faster than this?

priyansh_018: 2019-01-16 21:35:34

Simple Code.. AC in one go.

chutmarika: 2018-07-23 12:28:10

0.04 sec in c++

shahadat191: 2018-07-18 20:51:59

0.22 second in c++

akt_114: 2018-07-18 11:08:01

0.27 sec
AC in one go.

phoenix0o0: 2018-06-16 09:51:24

0.44 sec
AC in a go,,,

mayankparashar: 2018-03-06 18:07:02

help for peoples who is getting TLE in java
https://www.geeksforgeeks.org/fast-io-in-java-in-competitive-programming/

abhi5h1d: 2017-10-07 08:25:55

I also don't find any trick. It is running normally , AC in one Go

dunjen_master: 2017-07-24 23:21:53

getting TLE with getchar_unlocked can anyone tell why?...tried with cin along with ios_base::sync_with_stdio(false) ...done in 0.28 seconds


Added by:adrian
Date:2004-11-09
Time limit:2.112s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: NODEJS PERL6 VB.NET
Resource:Idea put forward by Michael Mendelsohn