結果
| 問題 |
No.212 素数サイコロと合成数サイコロ (2)
|
| コンテスト | |
| ユーザー |
chakku
|
| 提出日時 | 2015-10-17 22:29:20 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 939 bytes |
| コンパイル時間 | 632 ms |
| コンパイル使用メモリ | 73,816 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-22 11:00:32 |
| 合計ジャッジ時間 | 1,261 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
#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;
}
chakku