結果

問題 No.166 マス埋めゲーム
ユーザー javyjavy
提出日時 2015-12-07 02:17:51
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 276 ms / 1,000 ms
コード長 1,346 bytes
コンパイル時間 12,066 ms
コンパイル使用メモリ 435,032 KB
実行使用メモリ 56,992 KB
最終ジャッジ日時 2024-04-30 11:50:56
合計ジャッジ時間 16,819 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 268 ms
56,992 KB
testcase_01 AC 268 ms
56,856 KB
testcase_02 AC 269 ms
56,848 KB
testcase_03 AC 271 ms
56,924 KB
testcase_04 AC 264 ms
56,824 KB
testcase_05 AC 262 ms
56,816 KB
testcase_06 AC 260 ms
56,852 KB
testcase_07 AC 267 ms
56,912 KB
testcase_08 AC 263 ms
56,872 KB
testcase_09 AC 275 ms
56,852 KB
testcase_10 AC 263 ms
56,948 KB
testcase_11 AC 273 ms
56,832 KB
testcase_12 AC 268 ms
56,912 KB
testcase_13 AC 273 ms
56,928 KB
testcase_14 AC 271 ms
56,992 KB
testcase_15 AC 276 ms
56,824 KB
testcase_16 AC 270 ms
56,708 KB
testcase_17 AC 264 ms
56,960 KB
testcase_18 AC 260 ms
56,992 KB
testcase_19 AC 273 ms
56,944 KB
testcase_20 AC 269 ms
56,936 KB
testcase_21 AC 268 ms
56,856 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:3:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

package Yukicoder

fun main(args: Array<String>) {
    fun readLineLongArray(): List<Long> {
        val str = readLine() as String
        val arrStr = str.split(" ")
        val ret = arrStr.map { it.toLong() }
        return ret
    }

    fun readLineLong(): Long {
        val str = readLine() as String
        return str.toLong()
    }

    fun readLineInt(): Int {
        val str = readLine() as String
        return str.toInt()
    }

    fun readLineIntArray() : List<Int> {
        val str = readLine() as String
        val arrStr = str.split(" ")
        val ret = arrStr.map { it.toInt() }
        return ret
    }

    fun readLineDoubleArray(): List<Double> {
        val str = readLine() as String
        val arrStr = str.split(" ")
        val ret = arrStr.map { it.toDouble() }
        return ret
    }

    fun readLineDouble() : Double {
        val str = readLine() as String
        return str.toDouble()
    }


//    fun readLineStringArray(): List<String> {
//        val str = readLine() as String
//        val arrStr = str.split(" ")
//        return arrStr
//    }

    val input = readLineLongArray()
    val h = input[0]
    val w = input[1]
    val n = input[2]
    val k = input[3] % n
    val num = ((h % n) * (w % n)) % n
    if (num == k) {
        println("YES")
    } else {
        println("NO")
    }
}
0