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
krishp: 2020-11-22 18:22:58

.26 seconds JAVA. For anyone wondering, you have to use a Fast Input. You can find the code here:

It functions similar to scanner, but is a lot faster.

Last edit: 2020-11-27 23:02:33
mati_be: 2020-10-24 23:31:26

1.49 C#

souravs_1999: 2020-08-31 16:02:47

1.07 in PY3 and same code in 0.72 in PYPY

EDIT : 0.69 in PYPY

Last edit: 2020-09-03 04:13:33
exr0n: 2020-08-30 21:10:54

0.14 sec with `register` and `getchar_unlocked` :)

udayk454: 2020-08-24 05:53:26

0.3 in Java

abhrajyoti_00: 2020-08-23 08:27:43

0.17 sec in Cpp
0.72 in PYPY
1.07 in PY3

Last edit: 2020-08-23 08:28:28
kartikeysm2001: 2020-05-07 15:45:41

Just optimized my code from 2.04 to 0.48s !
Keep learning new things and applying them in your code!

p4avinash: 2020-04-28 14:32:01

@invisible1997 it also depends on the programming language you are using. Like C,C++ are very close to the machines as compared with Python and Java, programs in C++ and C executes faster than others plus your code also matters what's your time complexity.

p4avinash: 2020-04-28 14:29:42

0.3 seconds in c++

krishp: 2020-04-24 02:35:36

Last edit: 2020-11-22 18:22:49

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