結果

問題 No.643 Two Operations No.2
ユーザー 💕💖💞💕💖💞
提出日時 2018-04-06 20:42:28
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 323 ms / 2,000 ms
コード長 207 bytes
コンパイル時間 12,140 ms
コンパイル使用メモリ 430,572 KB
実行使用メモリ 57,064 KB
最終ジャッジ日時 2024-04-30 18:15:58
合計ジャッジ時間 14,790 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 323 ms
56,812 KB
testcase_01 AC 279 ms
56,980 KB
testcase_02 AC 286 ms
56,924 KB
testcase_03 AC 278 ms
57,064 KB
testcase_04 AC 275 ms
56,928 KB
testcase_05 AC 288 ms
56,804 KB
testcase_06 AC 279 ms
56,924 KB
testcase_07 AC 288 ms
56,672 KB
testcase_08 AC 276 ms
56,812 KB
testcase_09 AC 294 ms
56,944 KB
testcase_10 AC 280 ms
56,824 KB
testcase_11 AC 295 ms
56,904 KB
testcase_12 AC 284 ms
56,924 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