結果
| 問題 | No.144 エラトステネスのざる |
| コンテスト | |
| ユーザー |
testestest
|
| 提出日時 | 2017-01-13 04:17:07 |
| 言語 | C90 (gcc 15.2.0) |
| 結果 |
RE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 122 bytes |
| 記録 | |
| コンパイル時間 | 169 ms |
| コンパイル使用メモリ | 36,920 KB |
| 最終ジャッジ日時 | 2026-02-24 00:06:10 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | RE * 17 |
コンパイルメッセージ
main.c:1:12: warning: data definition has no type or storage class
1 | double s,p;n,j,x[2<<20];main(i){for(scanf("%d%lf",&n,&p);n/++i;s+=pow(1-p,x[i]))for(j=i;j<n;x[j+=i]++);i=!printf("%f",s);}
| ^
main.c: In function 'main':
main.c:1:37: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | double s,p;n,j,x[2<<20];main(i){for(scanf("%d%lf",&n,&p);n/++i;s+=pow(1-p,x[i]))for(j=i;j<n;x[j+=i]++);i=!printf("%f",s);}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | double s,p;n,j,x[2<<20];main(i){for(scanf("%d%lf",&n,&p);n/++i;s+=pow(1-p,x[i]))for(j=i;j<n;x[j+=i]++);i=!printf("%f",s);}
main.c:1:67: warning: incompatible implicit declaration of built-in function 'pow' [-Wbuiltin-declaration-mismatch]
1 | double s,p;n,j,x[2<<20];main(i){for(scanf("%d%lf",&n,&p);n/++i;s+=pow(1-p,x[i]))for(j=i;j<n;x[j+=i]++);i=!printf("%f",s);}
| ^~~
main.c:1:1: note: include '<math.h>' or provide a declaration of 'pow'
+++ |+#include <math.h>
1 | double s,p;n,j,x[2<<20];main(i){for(scanf("%d%lf",&n,&p);n/++i;s+=pow(1-p,x[i]))for(j=i;j<n;x[j+=i]++);i=!printf("%f",s);}
main.c:1:107: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
1 | double s,p;n,j,x[2<<20];main(i){for(scanf("%d%lf",&n,&p);n/++i;s+=pow(1-p,x[i]))for(j=i;j<n;x[j+=i]++);i=!printf("%f",s);}
| ^~~~~~
main.c:1:107: note: include '<stdio.h>' or provide a declaration of 'printf'
ソースコード
double s,p;n,j,x[2<<20];main(i){for(scanf("%d%lf",&n,&p);n/++i;s+=pow(1-p,x[i]))for(j=i;j<n;x[j+=i]++);i=!printf("%f",s);}
testestest