-
-
Save oyakodon/995fed9deda71a2e545e to your computer and use it in GitHub Desktop.
ARC048で実際に使ったプログラム。 / C#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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