結果

問題 No.9010 うるう年判定
ユーザー 🐧しゅんチャマ🌸
提出日時 2023-09-14 21:48:32
言語 Java
(openjdk 23)
結果
AC  
実行時間 137 ms / 2,000 ms
コード長 453 bytes
コンパイル時間 2,530 ms
コンパイル使用メモリ 74,044 KB
実行使用メモリ 41,516 KB
最終ジャッジ日時 2024-07-02 04:34:35
合計ジャッジ時間 7,536 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Y9010{
    public static void main(String args[]){
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        String ans="";
        if(n%4==0){
            ans="Yes";
            if(n%100==0){
                ans="No";
                if(n%400==0){
                    ans="Yes";
                }
            }
        }else{
            ans="No";
        }
        System.out.println(ans);
    }
}
0