結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー kyo1
提出日時 2020-04-11 02:20:54
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 397 bytes
コンパイル時間 1,696 ms
コンパイル使用メモリ 176,652 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-16 08:50:16
合計ジャッジ時間 2,850 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 25 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  vector<int> prime = {2, 3, 5, 7, 11, 13};
  vector<int> composite = {4, 6, 8, 9, 10, 12};
  map<int, int> mp;
  for (int p : prime) {
    for (int c : composite) {
      mp[p * c]++;
    }
  }
  int K;
  cin >> K;
  cout << fixed << setprecision(10) << mp[K] / 36.0 << '\n';
  return 0;
}
0