結果

問題 No.643 Two Operations No.2
ユーザー 💕💖💞💕💖💞
提出日時 2018-04-06 20:42:28
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 292 ms / 2,000 ms
コード長 207 bytes
コンパイル時間 11,643 ms
コンパイル使用メモリ 422,012 KB
実行使用メモリ 54,816 KB
最終ジャッジ日時 2023-08-12 23:18:33
合計ジャッジ時間 16,747 ms
ジャッジサーバーID
(参考情報)
judge12 / judge7
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 286 ms
52,800 KB
testcase_01 AC 288 ms
52,780 KB
testcase_02 AC 290 ms
52,972 KB
testcase_03 AC 290 ms
52,644 KB
testcase_04 AC 289 ms
54,816 KB
testcase_05 AC 292 ms
52,892 KB
testcase_06 AC 290 ms
52,752 KB
testcase_07 AC 290 ms
52,836 KB
testcase_08 AC 292 ms
52,804 KB
testcase_09 AC 291 ms
52,688 KB
testcase_10 AC 287 ms
52,632 KB
testcase_11 AC 287 ms
52,628 KB
testcase_12 AC 287 ms
52,860 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:11: 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()}
  when {
    a == b -> "0"
    a == 0 -> "2"
    b == 0 -> "1"
    a == -b -> "3"
    else -> "-1"
  }.let(::println)
}
0