Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register
Language:
快算24
Time Limit: 1000MSMemory Limit: 65536K
Total Submissions: 5761Accepted: 3448

Description

给定4个不大于10的正整数(范围1-10),要求在不改变数据先后顺序的情况下,采用加减乘除四种运算,找到一个表达式,使得最后的结果是24。

Input

4个不大于10的正整数。输入数据保证存在唯一解。

Output

不改变位置顺序,由'+','-','*','/'4个运算符和'(',')'组成的表达式

Sample Input

5 5 1 5

Sample Output

5*(5-(1/5))

Source

[Submit]   [Go Back]   [Status]   [Discuss]

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator