Triangle Quest

Sort by

recency

|

1033 Discussions

|

  • + 0 comments

    there is a constraint: 1 <= n <= 9, so multipling 11111111 mod it

    for i in range(1, int(input())): print(i * 11111111 % (10 ** i))

  • + 0 comments

    Simple no math

    for i in range(1,int(input())):
        print([1,22,333,4_444,55_555,666_666,7_777_777,88_888_888,999_999_999][i-1])
    
  • + 0 comments

    for i in range(1,int(input())): #More than 2 lines will result in 0 score. Do not leave a blank line also print((10**i-1)//9*i)

  • + 0 comments

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

  • + 0 comments

    below solution should be acceptance, not sure which test case is getting blocked, but seems using 'str' is not allowd with this example. n = int(input()) def pattern_output(n): for i in range (1, n): print (str(i) *i)

    pattern_output(n)