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
+ 0 comments Triangle Quest in Python – HackerRank Solution
https://www.chase2learn.com/triangle-quest-in-python-hackerrank-solution/
+ 0 comments for i in range(1,int(input())): print(((10**i)//9)*i)
+ 0 comments I guess I kinda cheated :)))))
for i in range (1,int(input())): print((11111111111111111111//10**(20-i))* i)
+ 0 comments print(int((i * pow(10, i - 1)) + (i * pow(10, (i - 2))) + (i * pow(10, (i - 3))) + (i * pow(10, (i - 4))) + (i * pow(10, (i - 5))) + (i * pow(10, (i - 6)))+ (i * pow(10, (i - 7)))+ (i * pow(10, (i - 8))) + (i * pow(10, (i - 9)))))
+ 0 comments i*10**i //9 1*10**1//9=>10//9=>1(why am i using double divide because single divide return float value so i need only integer value) 2*10**2//9=>22 3*10**3//9=>333 4*10**4//9=>4444 5*10**5//9=>55555
so as
Load more conversations
Sort 813 Discussions, By:
Please Login in order to post a comment