CodeLab Academy 📞 9936 6696
← List Python · Level 4: For loops Code · 40 points ← #334 #336 →

#335. Geometric progression: ratio 3

You get n. Start at 1 and multiply by 3 each time. Print the first n terms of this progression on one line. ### Input One integer n (1 ≤ n ≤ 20). ### Output One line.

Examples

Input
6
Output
1 3 9 27 81 243
Input
20
Output
1 3 9 27 81 243 729 2187 6561 19683 59049 177147 531441 1594323 4782969 14348907 43046721 129140163 387420489 1162261467

💡 You can solve it with Python, JavaScript or blocks. Read the input line by line with input(). Don't print a question (like input("Number: ")). Print exactly what the output asks for, nothing more.

🔒 You can solve the first 3 problems without an account. Sign up for free to solve this one!