We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Math
- Triangle Quest
- Discussions
Triangle Quest
Triangle Quest
Sort by
recency
|
1033 Discussions
|
Please Login in order to post a comment
there is a constraint: 1 <= n <= 9, so multipling 11111111 mod it
for i in range(1, int(input())): print(i * 11111111 % (10 ** i))
Simple no math
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)
print(((pow(10,i)*1)//9)*i)
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)