zoukankan      html  css  js  c++  java
  • Nine Digits Expression

    Problem:

    Insert + ,-,*,/ signs as necessary in the string 123456789 to form an expression that evaluates to a certain number.

    Answer:

    It returns:

    Solutions 1:    1*2345*6/7+8-9=2009
    Solutions 2:    1/2*3*4*5*67+8-9=2009
    Solutions 3:    1*2/3*45*67+8-9=2009
    3 solutions were found!

    Solutions 1:    9*8-7+6*54*3*2*1=2009
    Solutions 2:    9+8*7+6*54*3*2*1=2009
    Solutions 3:    9*8-7+6*54*3*2/1=2009
    Solutions 4:    9+8*7+6*54*3*2/1=2009
    4 solutions were found!

  • 相关阅读:
    saltstack实战
    ubuntu16配置mysql5.7主从同步
    推荐书单
    SpringMVC : 乐鲜电子商城
    Idea 使用指南
    SpringBoot : 人人托福系统网站
    Android : SQLite 版学生系统
    Android : 相机及本地储存
    Android : ListView 学生管理
    Android : SeekBar 实现图片旋转缩放
  • 原文地址:https://www.cnblogs.com/fengju/p/6336215.html
Copyright © 2011-2022 走看看