結果
| 問題 | No.211 素数サイコロと合成数サイコロ (1) |
| コンテスト | |
| ユーザー |
Bantako
|
| 提出日時 | 2017-07-10 19:33:27 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,000 ms |
| + 351µs | |
| コード長 | 311 bytes |
| 記録 | |
| コンパイル時間 | 92 ms |
| コンパイル使用メモリ | 40,704 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-30 04:06:33 |
| 合計ジャッジ時間 | 1,668 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 33 |
コンパイルメッセージ
main.cpp:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | main(){
| ^~~~
ソースコード
#include<stdio.h>
main(){
int prime[] = {2,3,5,7,11,13};
int comp[] = {4,6,8,9,10,12};
int N;
scanf("%d",&N);
int count=0;
for(int i = 0;i < 6;i++){
for(int j = 0;j < 6;j++){
if(N == prime[i]*comp[j])count++;
}
}
printf("%.12lf\n",1.*count/36);
}
Bantako