| Adam Gąsienica‑Samek Contest 1 |
|---|
| Finished |
Consider a programming language called assembly. In this language, there are 4 registers named $$$A$$$, $$$B$$$, $$$C$$$ and $$$D$$$ which are initially equal to $$$0$$$ and can each store an integer between $$$-2^{31}$$$ and $$$2^{31}-1$$$ inclusive. A program written in this language consists of several lines, each containing an instruction. The execution of a program starts from the first line and each line is followed by the next one, except in the case of a GOTO instruction (described below). The available instructions are:
Here:
Given two integers $$$n$$$ and $$$k$$$, your goal is to write an assembly program that does the following:
Note that the assembly program should not read the values of n and k.
The input contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le n \le 100$$$, $$$1 \le k \le 4$$$).
On the first line, print one integer $$$m$$$ ($$$1 \le m \le 125$$$) — the number of lines in your program.
Then print $$$m$$$ more lines. The $$$i^\text{th}$$$ line should consist of the integer $$$i$$$ followed by the $$$i^\text{th}$$$ instruction of your assembly program.
You will receive the Wrong Answer verdict if the program you output:
1 1
2 1 INPUT A 2 OUTPUT A
| Name |
|---|


