結果

問題 No.9010 うるう年判定
ユーザー hotaruhotaru
提出日時 2020-11-10 12:56:46
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 494 bytes
コンパイル時間 662 ms
コンパイル使用メモリ 84,208 KB
最終ジャッジ日時 2025-01-15 21:57:55
ジャッジサーバーID
(参考情報)
judge5 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <array>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
#define int long long

signed main()
{
    cin.tie(0);
    ios::sync_with_stdio(0);

    int n;
    cin >> n;

    bool ans = false;

    if (n % 400 == 0)
        ans = true;
    else if (n % 100 == 0)
        ans = false;
    else if (n % 4 == 0)
        ans = true;

    cout << (ans ? "Yes" : "No") << "\n";
}
0