結果

問題 No.9010 うるう年判定
ユーザー toshiro_yanagitoshiro_yanagi
提出日時 2018-10-06 16:49:24
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 265 ms / 2,000 ms
コード長 328 bytes
コンパイル時間 15,302 ms
コンパイル使用メモリ 414,808 KB
実行使用メモリ 50,748 KB
最終ジャッジ日時 2023-09-04 01:08:23
合計ジャッジ時間 20,847 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 254 ms
50,252 KB
testcase_01 AC 254 ms
50,260 KB
testcase_02 AC 255 ms
50,252 KB
testcase_03 AC 254 ms
50,388 KB
testcase_04 AC 254 ms
50,272 KB
testcase_05 AC 256 ms
50,292 KB
testcase_06 AC 254 ms
50,204 KB
testcase_07 AC 264 ms
50,324 KB
testcase_08 AC 263 ms
50,216 KB
testcase_09 AC 251 ms
50,336 KB
testcase_10 AC 252 ms
50,444 KB
testcase_11 AC 254 ms
50,260 KB
testcase_12 AC 260 ms
50,748 KB
testcase_13 AC 254 ms
50,220 KB
testcase_14 AC 254 ms
50,432 KB
testcase_15 AC 255 ms
50,212 KB
testcase_16 AC 258 ms
50,352 KB
testcase_17 AC 257 ms
50,204 KB
testcase_18 AC 258 ms
50,372 KB
testcase_19 AC 259 ms
50,340 KB
testcase_20 AC 258 ms
50,264 KB
testcase_21 AC 258 ms
50,368 KB
testcase_22 AC 256 ms
50,356 KB
testcase_23 AC 265 ms
50,164 KB
testcase_24 AC 252 ms
50,384 KB
testcase_25 AC 251 ms
50,264 KB
testcase_26 AC 254 ms
50,268 KB
testcase_27 AC 263 ms
50,184 KB
testcase_28 AC 252 ms
50,232 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:14:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

fun judge(N: Int): Boolean {
    if (N % 400 == 0) {
        return true
    }
    if (N % 100 == 0) {
        return false
    }
    if (N % 4 == 0) {
        return true
    }
    return false
}

fun main(args: Array<String>) {
    val N = readLine()!!.toInt()

    val ans = if (judge(N)) "Yes" else "No"
    println(ans)
}

0