結果

問題 No.9010 うるう年判定
ユーザー nao109
提出日時 2021-03-29 02:56:07
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 263 bytes
コンパイル時間 1,187 ms
コンパイル使用メモリ 157,428 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-29 09:39:38
合計ジャッジ時間 2,320 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
int main(){
    long n;
    cin >> n;
    int  ans;
    if(n%400==0) ans=1;
    else if(n%100==0) ans=0;
    else if(n%4==0) ans=1;
    else ans=0;
    if(ans==0) cout << "No" << endl;
    else cout << "Yes" << endl;
}
0