Triangle Quest
-
Practice>Python>Math>Triangle Questhackerrank.com 2019. 3. 7. 12:58
hackerrank.comTriangle QuestProblem link : https://www.hackerrank.com/challenges/python-quest-1/problemDifficulty : Medium Tip1 -> 1 / 1 -> 122 -> 22/2 -> 11333 -> 333/3 -> 1114444 -> 4444/4 -> 1111This is a first idea10 ** 1 // 9 -> 110 ** 2 // 9 -> 1110 ** 3 // 9 -> 11110 ** 4 // 9 -> 1111This is a second idea Solution for i in range(1, int(input())): print(10**i//9 * i)