結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー nenuon
提出日時 2017-06-25 11:59:26
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 600 bytes
コンパイル時間 823 ms
コンパイル使用メモリ 88,928 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-25 23:32:49
合計ジャッジ時間 2,159 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <bitset>
using namespace std;
#define FOR(I,A,B) for(int I = (A); I < (B); ++I)
typedef long long ll;

int main(){
  int K;
  cin >> K;
  double cnt[201];
  FOR(i,0,201){
    cnt[i] = 0;
  }
  int s1[6] = {2,3,5,7,11,13};
  int s2[6] = {4,6,8,9,10,12};
  FOR(i,0,6){
    FOR(j,0,6){
      cnt[s1[i]*s2[j]]++;
    }
  }
  printf("%.013lf\n", cnt[K]/36.0);
}
0