Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- namespace ConsoleApplication1
- {
- class Program
- {
- static void Main()
- {
- decimal[] input = Console.ReadLine()
- .Split(new Char[] {' '}, StringSplitOptions.RemoveEmptyEntries)
- .Select(item => decimal.Parse(item))
- .ToArray();
- if (input[0] + input[1] + input[2] == 13)
- {
- Console.WriteLine("Yes");
- }
- else if (input[0] - input[1] + input[2] == 13)
- {
- Console.WriteLine("Yes");
- }
- else if (input[0] - input[1] - input[2] == 13)
- {
- Console.WriteLine("Yes");
- }
- else if (input[0] + input[1] - input[2] == 13)
- {
- Console.WriteLine("Yes");
- }
- else if (-input[0] + input[1] - input[2] == 13)
- {
- Console.WriteLine("Yes");
- }
- else if (-input[0] - input[1] - input[2] == 13)
- {
- Console.WriteLine("Yes");
- }
- else if (-input[0] - input[1] + input[2] == 13)
- {
- Console.WriteLine("Yes");
- }
- else if (-input[0] + input[1] + input[2] == 13)
- {
- Console.WriteLine("Yes");
- }
- else
- {
- Console.WriteLine("No");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement