Welcome   HUNAN NORMAL UNIVERSITY ACM/ICPC Judge Online
Home
FAQs
Problem Set
Practices
Online Contests
Major Exercises
OI Special
Judgement
Submit
Online Status
User Ranklist
Users
Register new
Login
Web Links
Hunan Normal University
College of Information Science and Engineering
Twenty-fourpoint
Time Limit: 1000ms, Special Time Limit:2500ms, Memory Limit:65536KB
Total submit users: 36, Accepted users: 21
Problem 11534 : No special judgement
Problem description
  Given four numbers, can you get twenty-fourthrough the addition, subtraction, multiplication, and division? Each number can be used only once.

Input
  The input consists of multiple test cases. Each test case contains 4 integers A, B,C,Din a single line (1 <= A, B,C,D<= 13).

Output
  For each case, print the ˇ°Yesˇ± or ˇ°Noˇ±. If twenty-four point can be get, print ˇ°Yesˇ±, otherwise, print ˇ°Noˇ±.

Sample Input
2 2 3 9
1 1 1 1 
5 5 5 1
Sample Output
Yes
No
Yes
Judge Tips
  For the first sample, (2/3+2)*9=24.

Problem Source
  HUNNU Contest 

Submit   Discuss   Judge Status  Problems  Ranklist 

HUNAN NORMAL UNIVERSITY ACM/ICPC Judge Online, Version 2010.5.5.final.
Web visits:18544 today,16241535 total, since 2010-05-07