C#/C# (백준)
[C#] 백준 알고리즘 2753번, 윤년
서니션
2022. 7. 18. 15:13

using System;
namespace program3
{
class Program
{
static void Main(string[] args)
{
int year = int.Parse(Console.ReadLine());
if (year % 4 == 0 && year % 100 != 0)
{
Console.WriteLine("1");
}
else if (year % 400 == 0)
{
Console.WriteLine("1");
}
else
{
Console.WriteLine("0");
}
}
}
}