結果
問題 |
No.211 素数サイコロと合成数サイコロ (1)
|
ユーザー |
👑 |
提出日時 | 2020-01-21 01:26:23 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 352 bytes |
コンパイル時間 | 723 ms |
コンパイル使用メモリ | 69,888 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-02 23:33:14 |
合計ジャッジ時間 | 1,633 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 WA * 8 |
ソースコード
#include <iostream> #include <iomanip> using namespace std; int p[6] = {2,3,5,7,11,13}; int g[6] = {4,6,8,9,10,12}; int main(){ int n;cin>>n; int ans = 0; for(int i = 0; 6 > i; i++){ for(int j = 0; 6 > j; j++){ if(p[i]*g[j] == n)ans++; } } cout << fixed << setprecision(10) << (double)ans/36.0 << endl; }