結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー wightou
提出日時 2025-06-17 05:22:30
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 604 bytes
コンパイル時間 3,519 ms
コンパイル使用メモリ 275,240 KB
実行使用メモリ 7,844 KB
最終ジャッジ日時 2025-06-17 05:22:35
合計ジャッジ時間 4,507 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

/////////////////// メイン ///////////////////

int main () {
  
  //////////////////// 入力 ////////////////////

  int n;
  cin >> n;

  //////////////// 出力変数定義 ////////////////

  int result = 0;

  //////////////////// 処理 ////////////////////

  for (int i : {2,3,5,7,11,13}) {
    for (int j : {4,6,8,9,10,12}) {
      if (i*j==n) result++;
    }
  }

  //////////////////// 出力 ////////////////////

  cout << fixed << setprecision(15) << result/36.0 << endl;

  //////////////////// 終了 ////////////////////

  return 0;

}
0