結果
問題 | No.211 素数サイコロと合成数サイコロ (1) |
ユーザー |
|
提出日時 | 2020-05-19 16:43:23 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 1,000 ms |
コード長 | 317 bytes |
コンパイル時間 | 2,470 ms |
コンパイル使用メモリ | 194,536 KB |
最終ジャッジ日時 | 2025-01-10 13:10:07 |
ジャッジサーバーID (参考情報) |
judge4 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 33 |
ソースコード
#include<bits/stdc++.h> using namespace std; int main(){ cin.tie(0),ios::sync_with_stdio(false); vector<int>p={2,3,5,7,11,13},m={4,6,8,9,10,12}; int k; cin>>k; int n=0; for(int i=0;i<6;++i){ for(int j=0;j<6;++j){ if(p.at(i)*m.at(j)==k)++n; } } cout<<fixed<<setprecision(20)<<(long double)n/36<<"\n"s; }