結果

問題 No.212 素数サイコロと合成数サイコロ (2)
ユーザー troro_kelptroro_kelp
提出日時 2018-08-28 19:06:48
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 5 ms / 5,000 ms
コード長 1,182 bytes
コンパイル時間 747 ms
コンパイル使用メモリ 96,560 KB
実行使用メモリ 8,712 KB
最終ジャッジ日時 2023-09-24 22:58:47
合計ジャッジ時間 1,398 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 4 ms
8,472 KB
testcase_01 AC 4 ms
8,712 KB
testcase_02 AC 4 ms
8,344 KB
testcase_03 AC 4 ms
8,636 KB
testcase_04 AC 4 ms
8,600 KB
testcase_05 AC 4 ms
8,668 KB
testcase_06 AC 4 ms
8,628 KB
testcase_07 AC 4 ms
8,652 KB
testcase_08 AC 4 ms
8,652 KB
testcase_09 AC 5 ms
8,652 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <cmath>
#include <queue>
#include <numeric>
#include <climits>
#include <iterator>
#include <iomanip>
#include <stack>
#include <set>
#include <bitset>
#include <functional>
using namespace std;
const constexpr int INF = 1e9;
//typedef std::pair<std::string,double> P;


#define FOR(i, a, n) for (ll i = (ll)a; i<(ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)

typedef long long ll;
typedef vector<int> VI;
const constexpr ll MOD = 1e9+7;
vector<pair<int, int> > vp;
 
struct Less {
    bool operator()(const pair<int, int>& x, const pair<int, int>& y) const {
        return x.first > y.first;
    }
};

ll GCD(ll a, ll b){
    if(b==0) return a;
    return GCD(b, a%b);
}


//グラフの隣接リスト
VI g[200010];
//頂点の入次数を管理
int h[100010];
string s;
int p[6] = {2, 3, 5, 7, 11, 13};
int c[6] = {4, 6, 8, 9, 10, 12};
int main(void) {
    double P, K; cin >> P >> K;

    int sump = 2+3+5+7+11+13;
    int sumc = 4+6+8+9+10+12;
    
    double pp = (double)sump/6;
    double cc = (double)sumc/6;
    cout << setprecision(20) <<  pow(pp, P)*pow(cc, K) << endl;
}
0