結果

問題 No.9010 うるう年判定
ユーザー toshiro_yanagitoshiro_yanagi
提出日時 2018-10-06 16:48:59
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 263 ms / 2,000 ms
コード長 325 bytes
コンパイル時間 12,634 ms
コンパイル使用メモリ 416,408 KB
実行使用メモリ 52,416 KB
最終ジャッジ日時 2023-09-04 01:09:24
合計ジャッジ時間 19,636 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 258 ms
50,348 KB
testcase_01 AC 254 ms
50,288 KB
testcase_02 AC 254 ms
50,240 KB
testcase_03 AC 259 ms
50,480 KB
testcase_04 AC 257 ms
50,360 KB
testcase_05 AC 254 ms
52,184 KB
testcase_06 AC 258 ms
50,416 KB
testcase_07 AC 262 ms
50,256 KB
testcase_08 AC 259 ms
50,472 KB
testcase_09 AC 258 ms
50,492 KB
testcase_10 AC 261 ms
50,236 KB
testcase_11 AC 259 ms
50,284 KB
testcase_12 AC 259 ms
50,508 KB
testcase_13 AC 260 ms
50,412 KB
testcase_14 AC 259 ms
50,264 KB
testcase_15 AC 258 ms
52,416 KB
testcase_16 AC 258 ms
50,432 KB
testcase_17 AC 260 ms
50,368 KB
testcase_18 AC 260 ms
50,344 KB
testcase_19 AC 258 ms
50,368 KB
testcase_20 AC 260 ms
50,400 KB
testcase_21 AC 256 ms
50,436 KB
testcase_22 AC 256 ms
50,244 KB
testcase_23 AC 257 ms
50,348 KB
testcase_24 AC 259 ms
50,456 KB
testcase_25 AC 255 ms
50,256 KB
testcase_26 AC 253 ms
50,312 KB
testcase_27 AC 258 ms
50,352 KB
testcase_28 AC 263 ms
50,216 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