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.


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.


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


7 3


hide comments
vashisth: 2015-04-27 15:39:31

1.Use scanf printf instead of cin and cout (c++)
2.use getchar_unlocked() instead of scanf
3. 0.1s

Kevin Zheng: 2015-03-28 04:04:15

Exceeded time limit with Python 3, but re-submitted with PyPy and ran in 2.36 seconds!

Przemek Komosa: 2015-02-23 20:28:05

0.34 in Go 1.4 without syscall

Anubhav Balodhi : 2014-10-24 10:30:30

Is psyco there on SPOJ ??

shreya sahu: 2014-08-11 18:47:12

did it with C++ in 5.62s. how to improve it further?

Sahil Dua: 2014-07-12 11:24:48

I got AC in 5.57s while using nothing special as such in C. How can I improve it?
How to use getchar_unlocked( ) in this?

Last edit: 2014-07-12 11:27:27
setu basak: 2014-05-16 13:55:46

you can use getchar_unlocked() will give u less than 1 second

Rafael Perrella: 2014-02-09 08:57:49

How to get 0.5s in C/C++? I can't make it go lower than 0.7s...

Shashank Gupta: 2013-11-10 17:41:50

@numerix OK I'll look, thanks. :)

numerix: 2013-11-10 17:33:11

@Shashank Gupta: You will find some hints according this question on the SPOJ forum (Python subforum). If you do not find what you are looking for, you may ask there.

Added by:adrian
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