結果
| 問題 |
No.9010 うるう年判定
|
| ユーザー |
jellyfish_26
|
| 提出日時 | 2020-04-08 05:21:18 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 1,234 bytes |
| コンパイル時間 | 1,524 ms |
| コンパイル使用メモリ | 166,444 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-22 01:23:19 |
| 合計ジャッジ時間 | 2,081 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 25 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define PI 3.141592653589793
#define rep(i, n) for (int i = 0; i < (n); i++)
#define REP(i, a, n) for (int i = a; i < (n); i++)
#define rrep(i, n, k) for (int i = (n); i >= (k); i--);
#define all(x) (x).begin(), (x).end()
#define vi vector<int>
template<class T> istream &operator>>(istream&is,vector<T>&v){for(auto &elemnt:v)is>>elemnt;return is;}
template<class T,class U> istream &operator>>(istream&is,pair<T,U>&p){is>>p.first>>p.second;return is;}
template<class T>vector<T> make_vector(size_t a){return vector<T>(a);}
template<class T, class... Ts>auto make_vector(size_t a, Ts... ts){return vector<decltype(make_vector<T>(ts...))>(a, make_vector<T>(ts...));}
const int MOD = 1e9+ 7;
const int INF = 2e9;
int main() {
int N;
cin >> N;
bool four = (N % 4 == 0);
bool hundred = (N % 100 == 0);
bool fourHundred = (N % 400 == 0);
if (four) {
if (hundred) {
if (fourHundred) {
cout << "Yes" << endl;
return 0;
}
cout << "No" << endl;
return 0;
}
cout << "Yes" << endl;
return 0;
}
cout << "No" << endl;
return 0;
}
jellyfish_26