Why is this python code giving NZEC at HackerEarth?

狂风中的少年 提交于 2019-12-12 04:43:07

问题


T = int(raw_input())

for t in xrange(T):
    N = int(raw_input())
    print N+1
    print N*(N+1)/2
    for x in range(0,N+1):
        print x,
    print ''

I am getting NZEC for this code on HackerEarth. It is supposed to print the count, sum and nos between a range.

Sample Input :
1 // T
12 // N

Sample Output :
13
78
0 1 2 3 4 5 6 7 8 9 10 11 12

来源:https://stackoverflow.com/questions/33695107/why-is-this-python-code-giving-nzec-at-hackerearth

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!