結果

問題 No.212 素数サイコロと合成数サイコロ (2)
ユーザー naimonon77
提出日時 2015-09-20 22:48:03
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 516 bytes
コンパイル時間 380 ms
コンパイル使用メモリ 58,200 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-19 08:24:39
合計ジャッジ時間 831 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
#include <cstdio>
#include <string.h>
#include <stdlib.h>
#include <math.h>

#define FOR(i,a,b) for(int (i)=(a);i<(b);i++)

typedef long long ll;
typedef unsigned long long ull;
typedef long double lb;

/* ここからが本編 */


int main(void)
{
   int i,j,k,l;
   int p,c;
   double a,b,ans=1;
   a = (double)(2+3+5+7+11+13)/6;
   b = (double)(4+6+8+9+10+12)/6;

   cin >> p >> c;
   FOR(i,0,p) ans *= a;
   FOR(i,0,c) ans *= b;
   printf("%.14lf\n",ans);
   return 0;
}
0