結果
問題 | No.211 素数サイコロと合成数サイコロ (1) |
ユーザー |
|
提出日時 | 2019-12-23 03:22:25 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 20 ms / 1,000 ms |
コード長 | 379 bytes |
コンパイル時間 | 706 ms |
コンパイル使用メモリ | 75,776 KB |
最終ジャッジ日時 | 2025-01-08 14:06:05 |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 33 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> #include <map> using namespace std; typedef long long int ll; int a[]={2,3,5,7,11,13}; int b[]={4,6,8,9,10,12}; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); int k; cin >> k; double ans=0; for(int i=0;i<6;i++){ for(int j=0;j<6;j++){ if(a[i]*b[j]==k)ans++; } } printf("%.12f\n",ans/36.0 ); }