Triangle Quest 2

Sort by

recency

|

1136 Discussions

|

  • + 0 comments

    for i in range(1,int(input())+1): print(((10**i)//9)**2)

    this also works

  • + 0 comments

    for i in range(1,int(input())+1): print(((10**i)//9)*((10**i)//9))

  • + 0 comments

    any issue with ? print(sum([10**index for index in range(i)])**2)

  • + 0 comments

    This works but it says illatral string

    for i in range(1,int(input())+1): print(*range(1, i + 1), *range(i - 1, 0, -1), sep="")

    Another solution is

    for i in range(1,int(input())+1): print(int('1'*i)**2)

  • [deleted]Challenge Author
    + 0 comments

    For Python3

    print((pow(10, i)//9) ** 2)