結果
問題 |
No.9010 うるう年判定
|
ユーザー |
![]() |
提出日時 | 2017-05-18 00:57:15 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 402 bytes |
コンパイル時間 | 527 ms |
コンパイル使用メモリ | 58,004 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-17 21:06:25 |
合計ジャッジ時間 | 1,359 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 4 |
other | WA * 25 |
ソースコード
#include <iostream> #include <cmath> using namespace std; int main() { int N; cin >> N; double a = N/4; double b = N/100; double c = N/400; if ( ceil(a) == floor(a) ) { if ( ceil(b) == floor(b)) { if ( ceil(c) == floor(c)) { cout << "Yes" << endl; } cout << "No" << endl; } cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }