URAL 2066. Simple Expression
来源:互联网 发布:袜子推荐 知乎 编辑:程序博客网 时间:2024/06/06 19:30
2066. Simple Expression
Time limit: 1.0 second
Memory limit: 64 MB
Memory limit: 64 MB
You probably know that Alex is a very serious mathematician and he likes to solve serious problems. This is another problem from Alex.
You are given three nonnegative integers a, b, c. You have to arrange them in some order and put +, − or × signs between them to minimize the outcome of the resulting expression. You are not allowed to use unary minus and parentheses in the expression. There must be exactly one sign between every pair of neighbouring numbers. You should use standard order for performing operations (multiplication first, addition and subtraction then).
Input
There are three lines with one integer in each line. The numbers are arranged in non-decreasing order (0 ≤ a ≤ b ≤ c ≤ 100).
Output
Print one number — the minimal outcome.
Sample
123
-5
水题,有a,b,c三个数字,在之间添加 " + ", " - ", " * "使得结果最小
暴力枚举
0 0
- URAL 2066. Simple Expression
- ural 1047 Simple Calculations
- HDU2451 Simple Addition Expression
- camel simple expression
- HDU2451:Simple Addition Expression
- Simple Addition Expression
- ural 1 Simple Calculations 题解
- HDOJ 2451 Simple Addition Expression
- hdu 2451 Simple Addition Expression
- hdoj 2451 Simple Addition Expression
- 【DFS】hdu2451 Simple Addition Expression
- Simple Addition Expression(排列组合)
- HDU Simple Addition Expression 题解
- URAL 2003. Simple Magic(数学啊 )
- ural 2003. Simple Magic 数论 因数分解
- A Simple Sample for Expression Tree
- 12.3.3.19 General rules for simple expression
- A Simple Sample for Expression Tree
- VS生成的winform项目各个文件意义和解决方案资源管理器作用
- HDU:1027 Ignatius and the Princess II
- sha1() md5() 漏洞
- 湖南纬德大宗平台下架了是为什么?还有其他的平台可以操作吗
- meno
- URAL 2066. Simple Expression
- Real Time Transfer (RTT)
- ccf csp 2015-12-3 画图
- uestc oj 851方老师与素数
- 路由表的建立和形成
- Http请求之post和get提交
- C# List 嵌套学习总结
- 最小乘车费用
- 什么是Mixin模式:带实现的协议