結果
問題 |
No.371 ぼく悪いプライムじゃないよ
|
ユーザー |
👑 ![]() |
提出日時 | 2016-05-17 02:09:33 |
言語 | C90 (gcc 12.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 249 bytes |
コンパイル時間 | 164 ms |
コンパイル使用メモリ | 20,736 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-06 05:04:49 |
合計ジャッジ時間 | 2,320 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 41 RE * 1 |
コンパイルメッセージ
main.c:2:1: warning: data definition has no type or storage class 2 | j; | ^ main.c:2:1: warning: type defaults to ‘int’ in declaration of ‘j’ [-Wimplicit-int] main.c:3:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 3 | main(i){ | ^~~~ main.c: In function ‘main’: main.c:3:1: warning: type of ‘i’ defaults to ‘int’ [-Wimplicit-int] main.c:5:13: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 5 | for(scanf("%lld%lld",&L,&H);;q--){ | ^~~~~ main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ +++ |+#include <stdio.h> 1 | long long p[10000]={2},L,H,*q=p; main.c:5:13: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch] 5 | for(scanf("%lld%lld",&L,&H);;q--){ | ^~~~~ main.c:5:13: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ main.c:8:43: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration] 8 | if(q==p+i)return !printf("%lld",j**q); | ^~~~~~ main.c:8:43: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:8:43: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] main.c:8:43: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
ソースコード
long long p[10000]={2},L,H,*q=p; j; main(i){ for(;++i<1e5;i%j?*++q=i:0)for(j=2;j*j<=i&&i%j;j++); for(scanf("%lld%lld",&L,&H);;q--){ for(j=H/ *q;j>=*q&&j**q/L;j--){ for(i=0;p+i-q&&j%p[i];i++); if(q==p+i)return !printf("%lld",j**q); } } }