对于其他读者, here is the INTEST problem statement . 它旨在进行I/O吞吐量测试。
在我的系统中,我可以将循环替换为以下内容,从而节省15%的执行时间:
print sum(1 for line in sys.stdin if int(line) % k == 0)