Skip to content

Instantly share code, notes, and snippets.

@oyakodon
Created March 5, 2016 14:15
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/995fed9deda71a2e545e to your computer and use it in GitHub Desktop.
Save oyakodon/995fed9deda71a2e545e to your computer and use it in GitHub Desktop.
ARC048で実際に使ったプログラム。 / C#
using System;
class Program
{
static void Main(string[] args)
{
var input = Console.ReadLine().Split(' ');
var A = int.Parse(input[0]);
var B = int.Parse(input[1]);
var ret = Math.Abs(A - B);
if (A < 0 && B > 0 )
{
ret--;
}
Console.WriteLine(ret);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment