結果
| 問題 | 
                            No.211 素数サイコロと合成数サイコロ (1)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             tokizo
                         | 
                    
| 提出日時 | 2018-01-13 10:23:07 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 650 bytes | 
| コンパイル時間 | 842 ms | 
| コンパイル使用メモリ | 99,408 KB | 
| 最終ジャッジ日時 | 2025-01-05 07:29:14 | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 25 WA * 8 | 
ソースコード
#include <iostream>
#include <math.h>
#include <algorithm>
#include <functional>
#include <vector>
#include <typeinfo>
#include <climits>
#include <ctype.h>
#include <string>
using namespace std;
#define INIT cin.tie(0); ios::sync_with_stdio(false);
#define FOR(i, a, n) for (int i = a; i < n; i++)
#define REP(i, n) for(int i = 0; i < n; i++)
int main()
{
    INIT;
    int k;
    cin >> k;
    int A[6] = {2, 3, 5, 7, 11, 13};
    int B[6] = {4, 6, 8, 9, 10, 12};
    double cnt = 0;
    REP(i, 6){
        REP(j, 6){
            if(A[i] * B[j] == k) cnt++;
        }
    }
    double ans = cnt / 36;
    cout << ans << endl;
    return 0;
}
            
            
            
        
            
tokizo