백준 백준 BOJ C# 2753
2020. 1. 9. 20:27ㆍ백준 알고리즘 단계별/if 문
반응형
출제 링크 : https://www.acmicpc.net/problem/2753
코드
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
using System;
using static System.Console;
namespace baekjoon
{
class Program
{
static void Main(string[] args)
{
string input = Console.ReadLine();
int num = int.Parse(input);
if (((num % 4) == 0) && ((num % 100) > 0))
{
WriteLine("1");
}
else if ((num % 400) == 0)
{
WriteLine("1");
}
else
WriteLine("0");
}
}
}
http://colorscripter.com/info#e" target="_blank" style="color:#4f4f4ftext-decoration:none">Colored by Color Scripter
http://colorscripter.com/info#e" target="_blank" style="text-decoration:none;color:white">cs |
반응형