Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 39796

Exceeding time limit in Python

$
0
0

This is my solution for the enormous input test problem, and it is exceeding time limit.

n, k = [int(_) for _ in raw_input().split(" ")]
a = 0
for i in xrange(n):
    if int(raw_input())%k==0:
        a+=1
print a

What is wrong with this code?


Viewing all articles
Browse latest Browse all 39796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>