a) At every step of type A, the sum of the displayed numbers increases by 5. The remainder modulo 5 of the sum is invariant.
The sum of four consecutive powers of 3 is 3n+3n+1+3n+2+3n+3=3n(1+3+9+27)=40⋅3n, therefore initially we have the remainder zero modulo 5 and it is impossible to obtain 20192020.
b) At every step the product of the displayed numbers is multiplied by 35.
Initially the product is 31+2+...+19=3190 and after n type B steps the product will be equal to 3190+5n.
Suppose that in n steps the numbers are equal to a power of 3, at least 319. The product of the 20 numbers will be 320p, where p≥19.
We must have 320p=3190+5n, so n+38=4p. Since p≥19, we have n≥38.
Next we provide a succession of 38 type B steps to display in the end equal numbers.
In 15 steps, the numbers 1, 3, 32, 33, 34 become 315, 316, 317, 318, 319. In the next 10 steps 35, 36, 37, 38, 39 become 315, 316, 317, 318, 319 and the numbers 310, 311, 312, 313, 314 become 315, 316, 317, 318, 319 in 5 steps.
Thus in 30 steps numbers 315,316,317,318,319 are displayed each 4 times.
Numbers 315,315,315,315,316 become 318,318,318,318,319 after three steps.
Numbers 316,316,316,317,317 become 318,318,318,319,319 in 2 steps.
Numbers 317,317,318,318,318 become 318,318,319,319,319 in one step.
Therefore after 36 steps on Bogdan's computer screen are displayed 10 of 319 and 10 of 318.
In last 2 steps we make all numbers equal to 319.