#P15632. [2019 KAIST RUN Spring] A Plus Equals B

    ID: 15564 Type: RemoteJudge 1000ms 1024MiB Tried: 0 Accepted: 0 Difficulty: 8 Uploaded By: Tags>2019Special Judge高校校赛

[2019 KAIST RUN Spring] A Plus Equals B

题目描述

A+BA+B is a problem used to test one's basic knowledge for competitive programming. Here is yet another boring variation of it.

You have two integers, AA and BB. You want to make them equal. To do so, you can perform several steps, where each step is one of the following:

  • AA+=AA
  • AA+=BB
  • BB+=AA
  • BB+=BB

Unfortunately, A+BA+B is a hard problem for us, so you are allowed to make at most 5000 steps.

输入格式

Two integers A,BA, B are given. (1A,B10181 \le A, B \le 10^{18}).

输出格式

In the first line, print a single integer nn (0n50000 \le n \le 5000) denoting the number of steps.

In next nn lines, print one of the following strings to denote your desired operation: AA+=AA, AA+=BB, BB+=AA, or BB+=BB.

Any sequence of steps that yields the desired result will be judged correct.

2 3
4
B+=B
B+=A
A+=A
A+=A