結果
| 問題 | No.40 多項式の割り算 |
| コンテスト | |
| ユーザー |
testestest
|
| 提出日時 | 2015-08-15 21:52:55 |
| 言語 | C90 (gcc 12.4.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 151 bytes |
| 記録 | |
| コンパイル時間 | 128 ms |
| コンパイル使用メモリ | 29,608 KB |
| 最終ジャッジ日時 | 2026-02-23 19:19:12 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 32 |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class
1 | a[9999],n,j;main(){for(gets(a);~scanf("%d",a+n++););for(n--;--n>2;)a[n-2]+=a[n];for(;n&&!a[n]||!printf("%d\n",n);n--);for(;j<=n;printf("%d ",a[j++]));}
| ^
main.c: In function ‘main’:
main.c:1:33: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch]
1 | a[9999],n,j;main(){for(gets(a);~scanf("%d",a+n++););for(n--;--n>2;)a[n-2]+=a[n];for(;n&&!a[n]||!printf("%d\n",n);n--);for(;j<=n;printf("%d ",a[j++]));}
| ^~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
+++ |+#include <stdio.h>
1 | a[9999],n,j;main(){for(gets(a);~scanf("%d",a+n++););for(n--;--n>2;)a[n-2]+=a[n];for(;n&&!a[n]||!printf("%d\n",n);n--);for(;j<=n;printf("%d ",a[j++]));}
main.c:1:97: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
1 | a[9999],n,j;main(){for(gets(a);~scanf("%d",a+n++););for(n--;--n>2;)a[n-2]+=a[n];for(;n&&!a[n]||!printf("%d\n",n);n--);for(;j<=n;printf("%d ",a[j++]));}
| ^~~~~~
main.c:1:97: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
/usr/bin/ld: /tmp/ccHEHw7V.o: in function `main':
main.c:(.text.startup+0x1e): 警告: the `gets' function is dangerous and should not be used.
ソースコード
a[9999],n,j;main(){for(gets(a);~scanf("%d",a+n++););for(n--;--n>2;)a[n-2]+=a[n];for(;n&&!a[n]||!printf("%d\n",n);n--);for(;j<=n;printf("%d ",a[j++]));}
testestest