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

Why is that I get answers when I run in my system but not in codechef?

$
0
0

Considering this example, I find no flaw here...

def sorting():
    holder=[]
    t=int(input())
    for i in range(t):
        n=int(input())
        holder.append(n)
    holder.sort()
    for i in holder:
        print i
        if __name__='__main__':
                sorting()

What's wrong with this code? I get perfect results in my system but, not here.


Viewing all articles
Browse latest Browse all 39796

Trending Articles



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