結果

問題 No.998 Four Integers
ユーザー 👑 yumechiyumechi
提出日時 2021-02-18 01:53:14
言語 Scala(Beta)
(3.4.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 254 bytes
コンパイル時間 11,484 ms
コンパイル使用メモリ 261,400 KB
実行使用メモリ 65,084 KB
最終ジャッジ日時 2023-10-12 11:33:47
合計ジャッジ時間 38,213 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 976 ms
63,512 KB
testcase_01 AC 978 ms
63,784 KB
testcase_02 AC 984 ms
63,544 KB
testcase_03 AC 987 ms
64,084 KB
testcase_04 TLE -
testcase_05 AC 986 ms
63,612 KB
testcase_06 AC 984 ms
64,420 KB
testcase_07 AC 982 ms
63,648 KB
testcase_08 AC 966 ms
63,996 KB
testcase_09 AC 968 ms
63,592 KB
testcase_10 AC 956 ms
64,476 KB
testcase_11 AC 967 ms
63,660 KB
testcase_12 AC 968 ms
63,504 KB
testcase_13 AC 977 ms
63,624 KB
testcase_14 AC 981 ms
63,480 KB
testcase_15 AC 972 ms
63,496 KB
testcase_16 AC 970 ms
63,508 KB
testcase_17 AC 981 ms
63,644 KB
testcase_18 AC 971 ms
63,552 KB
testcase_19 AC 971 ms
63,536 KB
testcase_20 AC 967 ms
64,764 KB
testcase_21 AC 971 ms
65,084 KB
testcase_22 AC 982 ms
63,940 KB
testcase_23 AC 973 ms
63,580 KB
testcase_24 AC 966 ms
63,884 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner

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

  val arr = Array.fill(4)(sc.nextInt).sorted
  println(arr match {
    case t @ Array(m, _*) if t sameElements Array.range(m, m + 4) => "Yes"
    case _ => "No"
  })
}
0