Skip to content

Instantly share code, notes, and snippets.

@oyakodon
Created March 12, 2016 14:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oyakodon/edc74edf8312662a7037 to your computer and use it in GitHub Desktop.
Save oyakodon/edc74edf8312662a7037 to your computer and use it in GitHub Desktop.
ABC034で実際に使ったプログラムたち。 / C#
using System;
class Program
{
static void Main(string[] args)
{
var input = Console.ReadLine().Split(' ');
var x = int.Parse(input[0]);
var y = int.Parse(input[1]);
if (x < y )
{
Console.WriteLine("Better");
} else
{
Console.WriteLine("Worse");
}
}
}
using System;
class Program
{
static void Main(string[] args)
{
var n = int.Parse(Console.ReadLine());
if (n % 2 == 0 )
{
Console.WriteLine(n - 1);
} else
{
Console.WriteLine(n + 1);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment