Problem Link: http://www.spoj.com/problems/INTEST
from sys import stdin
import numpy as np
t, k = map(int, stdin.readline().split())
data = np.loadtxt(stdin, dtype='int')
out = 0
for i in xrange(t):
if not data[i] % k:
out += 1
print out
I thought(read) numpy is fast when in comes to loading data from files, is it true? am I doing something wrong?
there are solutions close to 1s, can you give me a hint about how it is done?
thanks..