結果
問題 | No.211 素数サイコロと合成数サイコロ (1) |
ユーザー |
|
提出日時 | 2015-10-24 14:42:20 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 533 bytes |
コンパイル時間 | 467 ms |
コンパイル使用メモリ | 57,576 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-25 22:41:53 |
合計ジャッジ時間 | 1,417 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 33 |
ソースコード
#include <iostream> #include <algorithm> #include <string> using namespace std; #define REP(i,a,b) for(i=a;i<b;i++) #define rep(i,n) REP(i,0,n) #define SQR(X) ((X)*(X)) typedef long long ll; typedef unsigned long long ull; typedef long double lb; /* ここからが本編 */ int main(void) { int i,j; int k; int a[6] = {2,3,5,7,11,13}; int b[6] = {4,6,8,9,10,12}; int cnt = 0; cin >> k; rep(i,6) { rep(j,6) { if(k == a[i]*b[j]) cnt++; } } printf("%.14lf\n",cnt/36.0); return 0; }