結果
| 問題 |
No.212 素数サイコロと合成数サイコロ (2)
|
| コンテスト | |
| ユーザー |
158b
|
| 提出日時 | 2015-05-22 23:11:27 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 680 bytes |
| コンパイル時間 | 445 ms |
| コンパイル使用メモリ | 64,296 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-06 05:31:22 |
| 合計ジャッジ時間 | 910 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
#include <iostream>
#include <algorithm>
#include <functional>
#include <string>
#include <limits.h>
#include <vector>
#include <numeric>
using namespace std;
int main(){
const int sosuu[6] = {2,3,5,7,11,13};
const int gousei[6] = {4,6,8,9,10,12};
const long pat[11] = {1,6,36,216,1296,7776,46656,279936,1679616,10077696,60466176};
const int sos = 41;
const int gou = 49;
int p,c;
double ans1 = 1;
double ans2 = 1;
double ans3;
cin >> p >> c;
for(int i=0; i<p; i++){
ans1 *= sos;
}
ans1 /= pat[p];
for(int i=0; i<c; i++){
ans2 *= gou;
}
ans2 /= pat[c];
ans3 = ans1 * ans2;
cout.precision(15);
cout << fixed << (double) ans3 << endl;
return 0;
}
158b