結果
| 問題 |
No.211 素数サイコロと合成数サイコロ (1)
|
| コンテスト | |
| ユーザー |
cww
|
| 提出日時 | 2016-09-26 00:25:52 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 522 bytes |
| コンパイル時間 | 1,531 ms |
| コンパイル使用メモリ | 166,456 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-25 23:13:46 |
| 合計ジャッジ時間 | 2,461 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 33 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define REP(i,n) for(int i=0; i<(n); i++)
#define D(x) for_each((x).begin(),(x).end(),[](auto& x){cout<<x<<" ";});
struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star;
int sum( int K )
{
int count{};
for( const auto& x : { 2,3,5,7,11,13 } )
{
for( const auto& y : { 4,6,8,9,10,12 } )
{
if( x * y == K )
{
count++;
}
}
}
return count;
}
int main()
{
int K;
cin >> K;
cout << fixed << setprecision(15) << sum(K) / 36.0 << endl;
return 0;
}
cww