結果
| 問題 | No.246 質問と回答 |
| コンテスト | |
| ユーザー |
testestest
|
| 提出日時 | 2015-11-07 20:07:11 |
| 言語 | C90 (gcc 12.4.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 105 bytes |
| 記録 | |
| コンパイル時間 | 309 ms |
| コンパイル使用メモリ | 28,620 KB |
| 最終ジャッジ日時 | 2026-02-23 19:46:06 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 30 |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class
1 | d=1<<29,l;main(i){for(;d;scanf("%d",i),l+=d*i,d/=2)printf("? %d\n",l+d),fflush(0);l=!printf("! %d\n",l);}
| ^
main.c: In function ‘main’:
main.c:1:26: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch]
1 | d=1<<29,l;main(i){for(;d;scanf("%d",i),l+=d*i,d/=2)printf("? %d\n",l+d),fflush(0);l=!printf("! %d\n",l);}
| ^~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
+++ |+#include <stdio.h>
1 | d=1<<29,l;main(i){for(;d;scanf("%d",i),l+=d*i,d/=2)printf("? %d\n",l+d),fflush(0);l=!printf("! %d\n",l);}
main.c:1:34: warning: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘int’ [-Wformat=]
1 | d=1<<29,l;main(i){for(;d;scanf("%d",i),l+=d*i,d/=2)printf("? %d\n",l+d),fflush(0);l=!printf("! %d\n",l);}
| ~^ ~
| | |
| | int
| int *
main.c:1:52: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
1 | d=1<<29,l;main(i){for(;d;scanf("%d",i),l+=d*i,d/=2)printf("? %d\n",l+d),fflush(0);l=!printf("! %d\n",l);}
| ^~~~~~
main.c:1:52: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
ソースコード
d=1<<29,l;main(i){for(;d;scanf("%d",i),l+=d*i,d/=2)printf("? %d\n",l+d),fflush(0);l=!printf("! %d\n",l);}
testestest