結果

問題 No.531 エヌスクミ島の平和協定
ユーザー 👑 yumechiyumechi
提出日時 2021-03-01 01:44:59
言語 Scala(Beta)
(3.4.0)
結果
AC  
実行時間 1,054 ms / 2,000 ms
コード長 278 bytes
コンパイル時間 9,139 ms
コンパイル使用メモリ 250,944 KB
実行使用メモリ 65,228 KB
最終ジャッジ日時 2024-04-14 03:29:01
合計ジャッジ時間 51,566 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 983 ms
65,140 KB
testcase_01 AC 989 ms
65,152 KB
testcase_02 AC 988 ms
65,124 KB
testcase_03 AC 1,040 ms
65,096 KB
testcase_04 AC 997 ms
65,156 KB
testcase_05 AC 1,007 ms
65,060 KB
testcase_06 AC 1,021 ms
64,924 KB
testcase_07 AC 1,020 ms
64,992 KB
testcase_08 AC 1,015 ms
65,056 KB
testcase_09 AC 1,042 ms
65,200 KB
testcase_10 AC 1,003 ms
65,104 KB
testcase_11 AC 997 ms
64,908 KB
testcase_12 AC 1,033 ms
64,936 KB
testcase_13 AC 1,054 ms
65,008 KB
testcase_14 AC 1,049 ms
64,944 KB
testcase_15 AC 1,012 ms
64,808 KB
testcase_16 AC 1,023 ms
65,120 KB
testcase_17 AC 1,020 ms
64,992 KB
testcase_18 AC 1,029 ms
64,984 KB
testcase_19 AC 990 ms
65,072 KB
testcase_20 AC 1,016 ms
65,132 KB
testcase_21 AC 986 ms
65,152 KB
testcase_22 AC 999 ms
64,996 KB
testcase_23 AC 988 ms
65,220 KB
testcase_24 AC 1,003 ms
65,028 KB
testcase_25 AC 986 ms
65,180 KB
testcase_26 AC 1,026 ms
65,052 KB
testcase_27 AC 995 ms
64,872 KB
testcase_28 AC 971 ms
65,088 KB
testcase_29 AC 987 ms
65,104 KB
testcase_30 AC 985 ms
65,000 KB
testcase_31 AC 975 ms
64,856 KB
testcase_32 AC 979 ms
65,228 KB
testcase_33 AC 981 ms
64,932 KB
testcase_34 AC 1,050 ms
64,880 KB
testcase_35 AC 994 ms
65,196 KB
testcase_36 AC 982 ms
65,048 KB
testcase_37 AC 992 ms
65,068 KB
testcase_38 AC 991 ms
65,116 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