Problem Description
Suppose we play a game where you are given N number of turns and T amount of starting money.
On each turn you may only choose between two moves:
Move A: you lose P1 (1 peso) when you choose this move.
Move B: you count how much money you have left. If it’s an even amount, you win P3, otherwise, you lose P5.
Output the optimal sequence of moves you need to play for each turn to arrive at the maximum possible earning or minimum possible loss from your starting money. Output as well the total number of earnings you get given N and T. It is required that you choose a move for each turn (you can’t pass on a turn).
Input Format
The input consists of several integer pairs N and T where 1≤N,T≤106
Output Format
Print “strategy: “ followed by the sequence of moves you will take.
On a separate line, print “total earned: “ followed by the total earnings you get after N turns.
Constraints
Maximum earnings will not exceed 1030
Clarification
To express a loss, follow the format:
total earned: P-2.00