結果

問題 No.816 Beautiful tuples
ユーザー 💕💖💞💕💖💞
提出日時 2019-05-06 14:45:06
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 294 ms / 1,500 ms
コード長 233 bytes
コンパイル時間 13,112 ms
コンパイル使用メモリ 429,608 KB
実行使用メモリ 60,384 KB
最終ジャッジ日時 2024-04-30 20:30:03
合計ジャッジ時間 14,897 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 288 ms
60,384 KB
testcase_01 AC 278 ms
60,236 KB
testcase_02 AC 280 ms
60,348 KB
testcase_03 AC 289 ms
60,324 KB
testcase_04 AC 284 ms
60,276 KB
testcase_05 AC 294 ms
60,276 KB
testcase_06 AC 282 ms
60,228 KB
testcase_07 AC 291 ms
60,244 KB
testcase_08 AC 286 ms
60,240 KB
testcase_09 AC 279 ms
60,348 KB
testcase_10 AC 281 ms
60,224 KB
testcase_11 AC 277 ms
60,352 KB
testcase_12 AC 275 ms
60,244 KB
testcase_13 AC 281 ms
60,220 KB
testcase_14 AC 278 ms
60,216 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args:Array<String>) {
         ^

ソースコード

diff #

fun main(args:Array<String>) {
    val (A, B) = readLine()!!.split(" ").map { it.toInt() }.sorted()

    when {
        3*A == 2*B -> A/2
        2*A == B -> A*3
        3*A == B -> 2*A
        else -> -1
    }.let { println(it) }
}
0