ENIGMA-0x03 (2025) - J3 At the ruins of the temple
View as PDF
Submit solution
Points:
100 (partial)
Time limit:
1.0s
Memory limit:
256M
Author:
Problem types
Allowed languages
Blockly, C, C++, Java, Pascal, Python
At the ruins of the temple

At the end of her journey, Annoula encounters the ruins of an ancient temple. The ruins are shaped like a cube, and Annoula believes they must have formed a right isosceles triangle, where each side has one more cube than the one above it, and the top side starts from 3. Can you write a program to help her figure out what the shape of the original temple was?
As input, it receives the height of the temple in cubes, and as output, the shape using the English letter H.
Example
Input
3
Output
HHH
HHHH
HHHHH
Comments