結果

問題 No.166 マス埋めゲーム
ユーザー 826814741_6826814741_6
提出日時 2019-01-04 19:18:13
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 330 ms / 1,000 ms
コード長 329 bytes
コンパイル時間 12,386 ms
コンパイル使用メモリ 439,872 KB
実行使用メモリ 57,000 KB
最終ジャッジ日時 2024-04-30 19:49:29
合計ジャッジ時間 20,544 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 322 ms
56,832 KB
testcase_01 AC 323 ms
56,868 KB
testcase_02 AC 320 ms
56,920 KB
testcase_03 AC 319 ms
56,812 KB
testcase_04 AC 322 ms
56,796 KB
testcase_05 AC 322 ms
56,916 KB
testcase_06 AC 322 ms
56,960 KB
testcase_07 AC 327 ms
56,856 KB
testcase_08 AC 330 ms
56,944 KB
testcase_09 AC 321 ms
56,896 KB
testcase_10 AC 322 ms
56,952 KB
testcase_11 AC 321 ms
56,908 KB
testcase_12 AC 324 ms
56,920 KB
testcase_13 AC 326 ms
56,800 KB
testcase_14 AC 326 ms
56,928 KB
testcase_15 AC 324 ms
56,936 KB
testcase_16 AC 325 ms
56,964 KB
testcase_17 AC 327 ms
56,916 KB
testcase_18 AC 324 ms
56,924 KB
testcase_19 AC 320 ms
57,000 KB
testcase_20 AC 328 ms
56,808 KB
testcase_21 AC 330 ms
56,808 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:10:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

fun f(h: Long, w: Long, n: Long, k: Long): Boolean {
    val t = h * w
    return when {
        t <= n -> t==k
        (t%n==k) || (n==k&&t%n==0L) -> true
        else -> false
    }
}

fun main(args: Array<String>) {
    val (h,w,n,k) = readLine()!!.split(' ').map(String::toLong)
    println(if (f(h,w,n,k)) "YES" else "NO")
}
0