結果
| 問題 | No.246 質問と回答 |
| コンテスト | |
| ユーザー |
testestest
|
| 提出日時 | 2015-11-07 20:06:06 |
| 言語 | C90 (gcc 12.4.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 114 bytes |
| 記録 | |
| コンパイル時間 | 354 ms |
| コンパイル使用メモリ | 28,612 KB |
| 最終ジャッジ日時 | 2026-02-23 19:45:56 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;l+=d*atoi(gets(&i)),d/=2)printf("? %d\n",l+d),fflush(0);l=!printf("! %d\n",l);fflush(0);}
| ^
main.c: In function ‘main’:
main.c:1:51: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
1 | d=1<<29,l;main(i){for(;d;l+=d*atoi(gets(&i)),d/=2)printf("? %d\n",l+d),fflush(0);l=!printf("! %d\n",l);fflush(0);}
| ^~~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
+++ |+#include <stdio.h>
1 | d=1<<29,l;main(i){for(;d;l+=d*atoi(gets(&i)),d/=2)printf("? %d\n",l+d),fflush(0);l=!printf("! %d\n",l);fflush(0);}
/usr/bin/ld: /tmp/cckmPYKK.o: in function `main':
main.c:(.text.startup+0x4b): 警告: the `gets' function is dangerous and should not be used.
ソースコード
d=1<<29,l;main(i){for(;d;l+=d*atoi(gets(&i)),d/=2)printf("? %d\n",l+d),fflush(0);l=!printf("! %d\n",l);fflush(0);}
testestest