编程介的小学生 2017-08-19 13:53 采纳率: 20.5%
浏览 809
已采纳

8*8

t is 8th anniversary birthday of ZOJ. 8 is a lucky number for Chinese. So today let's use 8 8's to express number with parentheses and fundamental operations of arithmetic.

Input

This problem contains up to 8888 test cases. Each test case contains an integer whose absolute value do not exceed 108 in one line.

Output

For each case, output an expression whose value is equal to the given number. The length of the expression must not exceed 30. The expression must contain exactly 8 8's. Parenthese and fundamental operations can be added if neccesary. Any expression that can get the result is accepted. If it is impossible to do this, output "Impossible" in one line.

Sample Input

1111111
-88888888
1144
Sample Output

8888888/8
Impossible
8888-88*88

  • 写回答

1条回答 默认 最新

  • devmiao 2017-08-29 16:40
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器