結果

問題 No.212 素数サイコロと合成数サイコロ (2)
ユーザー chakkuchakku
提出日時 2015-10-17 22:29:20
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 939 bytes
コンパイル時間 1,542 ms
コンパイル使用メモリ 72,824 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-29 16:56:24
合計ジャッジ時間 1,811 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 1 ms
4,384 KB
testcase_09 AC 2 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <cmath>
#include <queue>
#include <string>
#include <cstdio>
#include <cstring>
#include <climits>
#include <cmath>
using namespace std;

#define rep(i,n) for(ll i=0;i<n;i++)
#define REP(i,x,n) for(ll i=x;i<n;i++)
#define ALL(x) (x).begin(),(x).end()
#define debug(x) cout<<#x<<":"<<x<<endl
#define debug2(x,y) cout<<#x<<":"<<#y<<"=="<<x<<":"<<y<<endl
const int INF = INT_MAX / 3;
const int dx[] = { 1, 0, -1, 0 }, dy[] = { 0, 1, 0, -1 };
#define MOD 1000000007
typedef pair<int,int> P;
typedef long long ll;
typedef vector<int> vi;



int main(){
	int P, C;
	cin >> P >> C;
	vector<int> sosu{ 2, 3, 5, 7, 11, 13 };
	vector<int> gousei{ 4, 6, 8, 9, 10, 12 };

	double ans = 1;
	double s = 0;
	rep(i, 6) s += sosu[i];
	s /= 6;
	double g = 0;
	rep(i, 6) g += gousei[i];
	g /= 6;
	rep(i, P) ans *= s;
	rep(i, C) ans *= g;
	printf("%.20f\n", ans);
	return 0;
}
0