ComputerScience/Coding Test
백준 2420번: 사파리월드
VirtualDever
2022. 11. 12. 18:31
using System;
class Program {
static void Main(string[] args) {
string stringInput = Console.ReadLine();
string[] array = stringInput.Split(' ', StringSplitOptions.None);
long a = System.Convert.ToInt64(array[0]);
long b = System.Convert.ToInt64(array[1]);
long result = 0;
if (a < b) {
result = b - a;
}
else {
result = a - b;
}
result = Math.Abs(result);
Console.WriteLine(result);
}
}
문제 출처
https://www.acmicpc.net/problem/2420
2420번: 사파리월드
첫째 줄에 두 도메인의 유명도 N과 M이 주어진다. (-2,000,000,000 ≤ N, M ≤ 2,000,000,000)
www.acmicpc.net