結果
| 問題 |
No.212 素数サイコロと合成数サイコロ (2)
|
| コンテスト | |
| ユーザー |
kyuna
|
| 提出日時 | 2019-07-20 22:40:55 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 492 bytes |
| コンパイル時間 | 842 ms |
| コンパイル使用メモリ | 75,200 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-30 20:07:06 |
| 合計ジャッジ時間 | 1,784 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
#include <algorithm>
#include <iostream>
#include <vector>
#include <numeric>
#include <iomanip>
using namespace std;
int main() {
cout << fixed << setprecision(12);
int ps[] = {2, 3, 5, 7, 11, 13};
int cs[] = {4, 6, 8, 9, 10, 12};
int p, c; cin >> p >> c;
double ep = accumulate(ps, ps + 6, 0.0) / 6.0;
double ec = accumulate(cs, cs + 6, 0.0) / 6.0;
double ans = 1.0;
while (p--) ans *= ep;
while (c--) ans *= ec;
cout << ans << endl;
return 0;
}
kyuna