結果
問題 | No.211 素数サイコロと合成数サイコロ (1) |
ユーザー |
![]() |
提出日時 | 2023-08-02 17:06:57 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 492 bytes |
コンパイル時間 | 844 ms |
コンパイル使用メモリ | 105,128 KB |
最終ジャッジ日時 | 2025-02-15 21:28:15 |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 33 |
ソースコード
#include<iostream> #include<string> #include<algorithm> #include<cctype> #include<set> #include<bitset> #include<math.h> #include<map> #include<queue> #include<iomanip> using namespace std; int main(){ int n, cnt = 0; cin >> n; vector<int> a = {2, 3, 5, 7, 11, 13}, b = {4, 6, 8, 9, 10, 12}; for (int i = 0; i < 6; i++){ for (int j = 0; j < 6; j++){ if (a[i] * b[j] == n) cnt++; } } cout << fixed << setprecision(13) << cnt/36. << endl; }