結果
| 問題 |
No.211 素数サイコロと合成数サイコロ (1)
|
| コンテスト | |
| ユーザー |
775_koari
|
| 提出日時 | 2019-11-29 21:41:47 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 500 bytes |
| コンパイル時間 | 1,784 ms |
| コンパイル使用メモリ | 166,560 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-20 21:40:44 |
| 合計ジャッジ時間 | 2,609 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 WA * 8 |
ソースコード
#include<bits/stdc++.h>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define repi(i,a,b) for(int (i)=(a);(i)<(b);(i)++)
typedef long long ll;
using namespace std;
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
int k;
cin >> k;
int s[6] = {2,3,5,7,11,13};
int g[6] = {4,6,8,9,10,12};
double ans=0.0;
rep(i,6){
rep(j,6){
if(s[i]*g[j]==k){
ans++;
}
}
}
if(ans==0.0){
cout << ans << endl;
}else{
cout << ans/36.0 << endl;
}
return 0;
}
775_koari