結果

問題 No.85 TVザッピング(1)
ユーザー バカらっくバカらっく
提出日時 2019-09-26 19:58:31
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 310 ms / 5,000 ms
コード長 270 bytes
コンパイル時間 12,201 ms
コンパイル使用メモリ 454,400 KB
実行使用メモリ 54,412 KB
最終ジャッジ日時 2023-10-24 15:41:30
合計ジャッジ時間 23,473 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 296 ms
54,392 KB
testcase_01 AC 300 ms
54,392 KB
testcase_02 AC 301 ms
54,384 KB
testcase_03 AC 298 ms
54,392 KB
testcase_04 AC 294 ms
54,376 KB
testcase_05 AC 299 ms
54,412 KB
testcase_06 AC 296 ms
54,396 KB
testcase_07 AC 299 ms
54,372 KB
testcase_08 AC 300 ms
54,384 KB
testcase_09 AC 305 ms
54,376 KB
testcase_10 AC 291 ms
54,392 KB
testcase_11 AC 298 ms
54,404 KB
testcase_12 AC 299 ms
54,384 KB
testcase_13 AC 295 ms
54,388 KB
testcase_14 AC 299 ms
54,380 KB
testcase_15 AC 301 ms
54,380 KB
testcase_16 AC 301 ms
54,384 KB
testcase_17 AC 302 ms
54,380 KB
testcase_18 AC 302 ms
54,388 KB
testcase_19 AC 302 ms
54,384 KB
testcase_20 AC 304 ms
54,404 KB
testcase_21 AC 303 ms
54,388 KB
testcase_22 AC 299 ms
54,388 KB
testcase_23 AC 297 ms
54,388 KB
testcase_24 AC 310 ms
54,384 KB
testcase_25 AC 308 ms
54,372 KB
testcase_26 AC 309 ms
54,392 KB
testcase_27 AC 305 ms
54,376 KB
testcase_28 AC 304 ms
54,380 KB
testcase_29 AC 300 ms
54,384 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:2:10: warning: parameter 'args' is never used
fun main(args:Array<String>) {
         ^

ソースコード

diff #

fun main(args:Array<String>) {
    val (n,m) = readLine()!!.split(" ").map { it.toInt() }
    println(if(isValid(n,m)) "YES" else "NO")
}

fun isValid(n:Int, m:Int):Boolean {
    if(n == 1 || m == 1) {
        return n*m == 2
    }
    return n % 2 == 0 || m % 2 ==0
}
0