Header Ads

Header ADS

1144.logical sequence in python

This is the solution fo this problem in python:

N=int(input())
for i in range(1,N+1):
    print("%i %i %i"%(i,i*i,i*i*i))
    print("%i %i %i"%(i,(i*i)+1,(i*i*i)+1))

No comments

Powered by Blogger.