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

NZEC runtime error in python3

$
0
0

This solution for "the rise and fall of power (in practice(easy))" is showing NZEC error. though it runs fine in IDLE . Please help.

def main():
    t=input()
    for i in range(int(t)):
        n,k=input().split()
        pwr(n,k)
def pwr(n,k):
    s=int(n)**int(n)
    b=str(s)
    for i in range(int(k)):
        print(b[i],end="")
    print(" ",end="")
    for i in range(int(k),0,-1):
        print(b[-i],end="")
    print()

if _name__=="__main_":main()

Viewing all articles
Browse latest Browse all 39796

Trending Articles



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