結果
| 問題 |
No.9010 うるう年判定
|
| ユーザー |
|
| 提出日時 | 2020-11-10 12:58:39 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 494 bytes |
| コンパイル時間 | 612 ms |
| コンパイル使用メモリ | 84,232 KB |
| 最終ジャッジ日時 | 2025-01-15 21:58:01 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 25 |
ソースコード
#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";
}