結果

問題 No.212 素数サイコロと合成数サイコロ (2)
ユーザー naimonon77
提出日時 2015-09-20 22:21:57
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 519 bytes
コンパイル時間 510 ms
コンパイル使用メモリ 58,876 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-19 08:24:29
合計ジャッジ時間 958 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 8 WA * 2
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:28:15: warning: use of ‘ll’ length modifier with ‘f’ type character has either no effect or undefined behavior [-Wformat=]
   28 |    printf("%llf\n",ans);
      |               ^

ソースコード

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;
   long 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("%llf\n",ans);
   return 0;
}
0