結果
| 問題 |
No.211 素数サイコロと合成数サイコロ (1)
|
| コンテスト | |
| ユーザー |
keisuke6
|
| 提出日時 | 2022-08-15 23:28:20 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 298 bytes |
| コンパイル時間 | 1,958 ms |
| コンパイル使用メモリ | 194,404 KB |
| 最終ジャッジ日時 | 2025-01-30 22:59:35 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 33 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
int ans = 0;
vector<int> A={2,3,5,7,11,13},B={4,6,8,9,10,12};
int N;
cin>>N;
for(int i=0;i<6;i++)for(int j=0;j<6;j++) if(A[i]*B[j] == N) ans++;
cout<<fixed<<setprecision(15);
cout<<ans*1.0/36<<endl;
}
keisuke6