結果

問題 No.531 エヌスクミ島の平和協定
ユーザー 👑 yumechiyumechi
提出日時 2021-03-01 01:44:16
言語 Scala(Beta)
(3.4.0)
結果
WA  
実行時間 -
コード長 277 bytes
コンパイル時間 9,226 ms
コンパイル使用メモリ 258,724 KB
実行使用メモリ 65,252 KB
最終ジャッジ日時 2024-04-14 03:28:08
合計ジャッジ時間 46,780 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 930 ms
65,024 KB
testcase_01 AC 929 ms
65,124 KB
testcase_02 AC 928 ms
65,012 KB
testcase_03 AC 926 ms
64,952 KB
testcase_04 WA -
testcase_05 AC 918 ms
64,976 KB
testcase_06 WA -
testcase_07 AC 926 ms
65,084 KB
testcase_08 AC 919 ms
64,932 KB
testcase_09 AC 930 ms
65,016 KB
testcase_10 AC 923 ms
65,116 KB
testcase_11 AC 919 ms
65,052 KB
testcase_12 AC 920 ms
65,068 KB
testcase_13 AC 913 ms
64,956 KB
testcase_14 AC 909 ms
65,172 KB
testcase_15 AC 917 ms
65,036 KB
testcase_16 WA -
testcase_17 AC 917 ms
65,144 KB
testcase_18 AC 930 ms
65,036 KB
testcase_19 AC 919 ms
65,036 KB
testcase_20 AC 923 ms
65,004 KB
testcase_21 AC 928 ms
64,944 KB
testcase_22 AC 931 ms
65,068 KB
testcase_23 AC 927 ms
65,072 KB
testcase_24 AC 922 ms
65,064 KB
testcase_25 AC 932 ms
64,928 KB
testcase_26 AC 924 ms
64,928 KB
testcase_27 AC 919 ms
64,940 KB
testcase_28 AC 922 ms
65,040 KB
testcase_29 AC 920 ms
65,020 KB
testcase_30 AC 933 ms
65,228 KB
testcase_31 AC 920 ms
64,976 KB
testcase_32 AC 935 ms
65,176 KB
testcase_33 AC 936 ms
65,148 KB
testcase_34 AC 927 ms
65,240 KB
testcase_35 AC 938 ms
65,104 KB
testcase_36 AC 936 ms
65,104 KB
testcase_37 AC 929 ms
65,000 KB
testcase_38 AC 938 ms
65,084 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner

object Main extends App {
  val sc = new Scanner(System.in)

  val n = sc.nextInt
  val m = sc.nextInt

  def solve(n: Int, m: Int): Int = {
    if (m >= n) return 1
    if (n % 2 == 0) return if (m > n/2) 2 else -1
    -1
  }
  println(solve(n, m))
}
0