Thursday, August 24, 2017

2235 Walking in Time URI Problem Only Solution In C#

using System; 

 class Exercise8


   
       
     static void Main()
    
    {
       
    string s=Console.ReadLine();

    string[] joy=s.Split(' ');

    int a=int.Parse(joy[0]);
    int b=int.Parse(joy[1]);
    int c=int.Parse(joy[2]);

    if(a==b||a==c||b==c)
    {
        Console.WriteLine("S");
    }

    else if((a+b)==c||(a+c)==b||(b+c)==a)
    {
       Console.WriteLine("S");
    }

    else
    {
        Console.WriteLine("N");
    }

    }

}

No comments:

Post a Comment