22242_Nine

2022-5-16 18:21| 发布者: Hocassian| 查看: 17| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-5-89506228800999-Problem List-采集的数据-后羿采集器.html

Pro.ID

22242

Title

Nine

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=22242

AC

2

Submit

20

Ratio

10.00%

时间&空间限制

  • Time Limit: 1000/500 MS (Java/Others)     Memory Limit: 65536/65536 K (Java/Others)
  • 描述

    One day, Merlin found something strange. He can make a number between 1 and 100 using 1 to 9 once and only once.

    For example,

          7436
     6 = 2-----
          1859

    You problem is that to show all the solutions of giving numbers.

    To simply the problem, you have only one form like this:

          C
     A = B--
          D

    输入

    This problem has multiple test cases. Each case has one line of only one integer A between 1 and 100 (included 1 and 100). The input is terminated by one line of one number 0.

    输出

    Description

    One day, Merlin found something strange. He can make a number between 1 and 100 using 1 to 9 once and only once.

    For example,

          7436
     6 = 2-----
          1859

    You problem is that to show all the solutions of giving numbers.

    To simply the problem, you have only one form like this:

          C
     A = B--
          D

    Input

    This problem has multiple test cases. Each case has one line of only one integer A between 1 and 100 (included 1 and 100). The input is terminated by one line of one number 0.

    Output

    You must print all the solutions of each input number A using the print form like the sample output. You must print the smaller B first, and then the smaller C. If it can't make the number, print a string of "impossible".

    Sample Input

    45
    1
    0

    Sample Output

         3564
    45=27----
          198
         4172
    45=38----
          596
    impossible

    Source

    样例输入

    45
    1
    0

    样例输出

         3564
    45=27----
          198
         4172
    45=38----
          596
    impossible

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部