結果
| 問題 |
No.211 素数サイコロと合成数サイコロ (1)
|
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2022-08-08 18:20:57 |
| 言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 18 ms / 1,000 ms |
| コード長 | 616 bytes |
| コンパイル時間 | 728 ms |
| コンパイル使用メモリ | 76,852 KB |
| 最終ジャッジ日時 | 2025-01-30 19:27:21 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 33 |
ソースコード
#include <iostream>
#include <list>
#include <vector>
#include <string>
#include <stdio.h>
#include <stdint.h>
using namespace std;
using uint = unsigned int;
using ll = long long;
#define CIN( LL , A ) LL A; cin >> A
#define GETLINE( A ) string A; getline( cin , A )
#include <iomanip>
int main()
{
CIN( ll , K );
const ll P[6] = { 2 , 3 , 5 , 7 , 11 , 13 };
const ll C[6] = { 4 , 6 , 8 , 9 , 10 , 12 };
ll num = 0;
for( ll i = 0 ; i < 36 ; i++ ){
if( K == P[i/6] * C[i%6] ){
num++;
}
}
double p = num / 36.0;
cout << setprecision( 13 ) << p << endl;
return 0;
}