結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー f843nmfwisfeuw
提出日時 2020-08-21 18:29:47
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 678 bytes
コンパイル時間 763 ms
コンパイル使用メモリ 94,952 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-15 04:54:32
合計ジャッジ時間 1,740 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <stack>
#include <algorithm>
#include <string>
#include <map>
#include <iterator>
#include <set>
#include <queue>
#include <bitset>
#include <cassert>

using namespace std;


int main() {
    int K;
    cin>>K;
    int cnt = 0;
    vector<int> xs = {2, 3, 5, 6, 11, 13};
    vector<int> ys = {4, 6, 8, 9, 10, 12};
    for (int i = 0; i < 6; ++i) {
        for (int j = 0; j < 6; ++j) {
            if (xs[i] * ys[i] == K) {
                cnt += 1;
            }
        }
    }

    cout << fixed << setprecision(12) << (double) cnt / (double) 36 << endl;

    return 0;
}
0