結果

問題 No.816 Beautiful tuples
ユーザー 💕💖💞💕💖💞
提出日時 2019-05-06 14:43:39
言語 Kotlin
(1.9.23)
結果
WA  
実行時間 -
コード長 233 bytes
コンパイル時間 9,529 ms
コンパイル使用メモリ 440,516 KB
実行使用メモリ 60,508 KB
最終ジャッジ日時 2024-04-30 20:29:16
合計ジャッジ時間 14,908 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 292 ms
60,400 KB
testcase_02 AC 272 ms
60,304 KB
testcase_03 WA -
testcase_04 AC 285 ms
60,420 KB
testcase_05 AC 277 ms
60,324 KB
testcase_06 AC 273 ms
60,356 KB
testcase_07 AC 274 ms
60,200 KB
testcase_08 AC 283 ms
60,320 KB
testcase_09 AC 278 ms
60,196 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 281 ms
60,344 KB
testcase_13 AC 270 ms
60,344 KB
testcase_14 AC 276 ms
60,268 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 -> B*3
        3*A == B -> 2*A
        else -> -1
    }.let { println(it) }
}
0