結果
| 問題 |
No.212 素数サイコロと合成数サイコロ (2)
|
| コンテスト | |
| ユーザー |
fiord
|
| 提出日時 | 2015-05-23 07:53:58 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 275 bytes |
| コンパイル時間 | 380 ms |
| コンパイル使用メモリ | 54,088 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-06 06:04:10 |
| 合計ジャッジ時間 | 917 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:5:30: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | int p,c; scanf("%d %d",&p,&c);
| ~~~~~^~~~~~~~~~~~~~~
ソースコード
#include <cstdio>
#include <iostream>
using namespace std;
int main(){
int p,c; scanf("%d %d",&p,&c);
long long int ans=1,ifac=1;
for(int i=0;i<p;i++){
ans*=41; ifac*=6;
}
for(int j=0;j<c;j++){
ans*=49; ifac*=6;
}
printf("%.20lf\n",ans/(double)ifac);
return 0;
}
fiord