DEV Community

loading...

Discussion on: Daily Challenge #203 - Pascal's Triangle

Collapse
insogamer1 profile image
InsoGamer

Little lazy solution using 11 in python3

def easyLine(n):
    if n<0:
        return
    print (sum( [ int(i)**2 for i in str(11**n)] ))