結果
| 問題 | 
                            No.211 素数サイコロと合成数サイコロ (1)
                             | 
                    
| コンテスト | |
| ユーザー | 
                            👑  | 
                    
| 提出日時 | 2020-01-21 01:27:31 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 2 ms / 1,000 ms | 
| コード長 | 352 bytes | 
| コンパイル時間 | 597 ms | 
| コンパイル使用メモリ | 69,888 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-07-02 23:33:12 | 
| 合計ジャッジ時間 | 1,873 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 33 | 
ソースコード
#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(20) << (double)ans/36.0 << endl;
}