You work as an engineer in a secret laboratory and test the new computing module "Quadron". The module accepts commands in the form of text lines through the console. Your task & mdash; Write a symbol program that will emulate the work of this module.
rn
the simulator should work in the cycle, constantly expecting a command to complete the work.
rn
module commands:
rn
rn set & lt; number & gt; : This team sets the upper border of calculations & nbsp; n Сodee>. For example, & nbsp; to set 10 & nbsp; it means that & nbsp; n & nbsp; now 10. The program must confirm the installation by displaying a message & nbsp; the new limit N = 10 is set. . If the number in the team is indicated incorrectly (for example, this is not a number), the program should derive an error. rn
: the simulator must find all the valid numbers in this command in this command. The range from 0 to & nbsp; n & nbsp; (inclusive), build each square, and then fold all the resulting squares. The result must be deduced in & nbsp format; the calculation result for n = 10: 220 . If & nbsp; n & nbsp; has not yet been installed using the first command, the program should report an error. rn
output : this team completes the simulator. RN OL> RN
you need to create a program that will correctly process these commands, manage the state (value & nbsp; n Сode>) and perform calculations using cycles and conditions.
Input format
Team (String). This is a text line that can be one of the three: & nbsp; set & lt; number & gt; , & nbsp; calculate & nbsp; or & nbsp; output . The program accepts commands sequentially, one after another.
Output format
Simulator response (String). This is a text line that depends on the entered command. This may be confirmation, the result of the calculation or error message.
Example
Input
Install 10
Calculate
Exit
Output
The new limit n = 10 is set.
The calculation result for n = 10: 220
Hint
There will be no clue here, decide for yourself!