結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー neko_the_shadowneko_the_shadow
提出日時 2018-12-05 23:36:49
言語 Scala(Beta)
(3.4.0)
結果
AC  
実行時間 952 ms / 1,000 ms
コード長 323 bytes
コンパイル時間 12,762 ms
コンパイル使用メモリ 252,860 KB
実行使用メモリ 62,492 KB
最終ジャッジ日時 2023-09-13 21:14:37
合計ジャッジ時間 46,141 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 900 ms
62,004 KB
testcase_01 AC 867 ms
61,752 KB
testcase_02 AC 876 ms
62,004 KB
testcase_03 AC 868 ms
61,956 KB
testcase_04 AC 870 ms
61,940 KB
testcase_05 AC 874 ms
62,048 KB
testcase_06 AC 896 ms
62,000 KB
testcase_07 AC 872 ms
62,016 KB
testcase_08 AC 871 ms
62,384 KB
testcase_09 AC 876 ms
62,284 KB
testcase_10 AC 887 ms
61,992 KB
testcase_11 AC 870 ms
62,408 KB
testcase_12 AC 868 ms
62,060 KB
testcase_13 AC 871 ms
61,956 KB
testcase_14 AC 937 ms
62,248 KB
testcase_15 AC 878 ms
61,980 KB
testcase_16 AC 874 ms
62,036 KB
testcase_17 AC 944 ms
62,020 KB
testcase_18 AC 952 ms
62,260 KB
testcase_19 AC 940 ms
61,944 KB
testcase_20 AC 936 ms
62,492 KB
testcase_21 AC 881 ms
61,844 KB
testcase_22 AC 884 ms
61,796 KB
testcase_23 AC 869 ms
61,908 KB
testcase_24 AC 898 ms
62,004 KB
testcase_25 AC 885 ms
62,024 KB
testcase_26 AC 873 ms
62,056 KB
testcase_27 AC 939 ms
61,888 KB
testcase_28 AC 876 ms
61,900 KB
testcase_29 AC 878 ms
62,016 KB
testcase_30 AC 869 ms
62,008 KB
testcase_31 AC 911 ms
61,852 KB
testcase_32 AC 876 ms
61,900 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

object Q211 {
  def main(args: Array[String]): Unit = {
    val k = io.StdIn.readLine().toInt

    val primes = Seq(2, 3, 5, 7, 11, 13)
    val composites = Seq(4, 6, 8, 9, 10, 12)
    val numer = (for (prime <- primes; composite <- composites) yield prime * composite).count(_ == k)
    println(numer.toDouble / 36)
  }
}
0