Problem Description
Python Program to Read a number n and Compute n+nn+nnn...
Eg. if n=4, then 4+4*4+4*4*4+4*4*4*4CODING ARENA
n=int(input())
count=0
for i in range(1,n+1):
ans=n**i
count+=ans
print(count)
Test Case 1
Input (stdin)5
Expected Output3905
Test Case 2
Input (stdin)6
Expected Output55986
No comments:
Post a Comment