結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー kotatsugame
提出日時 2016-10-30 06:56:24
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 176 bytes
コンパイル時間 635 ms
コンパイル使用メモリ 65,196 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-24 23:31:14
合計ジャッジ時間 1,786 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 29 WA * 4
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){int a[6]={2,3,5,7,11,13},b[6]={4,6,8,9,10,12},c=0,k,i=5,j;std::cin>>k;for(;i--;){j=5;for(;j--;)if(a[i]*b[j]==k)c++;}printf("%.12f",c/36.0);return 0;}
      | ^~~~

ソースコード

diff #

#include <iostream>
main(){int a[6]={2,3,5,7,11,13},b[6]={4,6,8,9,10,12},c=0,k,i=5,j;std::cin>>k;for(;i--;){j=5;for(;j--;)if(a[i]*b[j]==k)c++;}printf("%.12f",c/36.0);return 0;}
0