Submit | All submissions | Best solutions | Back to list |
INTEST - Enormous Input Test |
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
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 |
hide comments
|
|||||||||||
2015-07-08 10:50:43
0.11 sec ac :D fast scanning with getchar_unlocked. try that and use long int n at end of input |
|||||||||||
2015-06-28 15:01:55 Sue
0.63s with pas :)))) |
|||||||||||
2015-06-13 05:58:03
Did anyone pass this using Haskell? |
|||||||||||
2015-04-27 15:39:31 vashisth
1.Use scanf printf instead of cin and cout (c++) 2.use getchar_unlocked() instead of scanf 3. 0.1s |
|||||||||||
2015-03-28 04:04:15 Kevin Zheng
Exceeded time limit with Python 3, but re-submitted with PyPy and ran in 2.36 seconds! |
|||||||||||
2015-02-23 20:28:05 Przemek Komosa
0.34 in Go 1.4 without syscall |
|||||||||||
2014-10-24 10:30:30 Anubhav Balodhi
Is psyco there on SPOJ ?? |
|||||||||||
2014-08-11 18:47:12 shreya sahu
did it with C++ in 5.62s. how to improve it further? |
|||||||||||
2014-07-12 11:24:48 Sahil Dua
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 |
|||||||||||
2014-05-16 13:55:46 setu basak
you can use getchar_unlocked() function..it will give u less than 1 second |