結果
問題 |
No.446 ゆきこーだーの雨と雪 (1)
|
ユーザー |
👑 ![]() |
提出日時 | 2016-12-04 08:04:08 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 96 bytes |
コンパイル時間 | 129 ms |
コンパイル使用メモリ | 19,200 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-27 19:38:56 |
合計ジャッジ時間 | 701 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 13 |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | n;char*t,s[];main(){for(;gets(s);n|=strtol(s,&t,0)>12345|*t|*s<49&!!s[1]);n=!puts(n?"NG":"OK");} | ^ main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘n’ [-Wimplicit-int] main.c:1:14: warning: return type defaults to ‘int’ [-Wimplicit-int] 1 | n;char*t,s[];main(){for(;gets(s);n|=strtol(s,&t,0)>12345|*t|*s<49&!!s[1]);n=!puts(n?"NG":"OK");} | ^~~~ main.c: In function ‘main’: main.c:1:26: warning: implicit declaration of function ‘gets’ [-Wimplicit-function-declaration] 1 | n;char*t,s[];main(){for(;gets(s);n|=strtol(s,&t,0)>12345|*t|*s<49&!!s[1]);n=!puts(n?"NG":"OK");} | ^~~~ main.c:1:37: warning: implicit declaration of function ‘strtol’ [-Wimplicit-function-declaration] 1 | n;char*t,s[];main(){for(;gets(s);n|=strtol(s,&t,0)>12345|*t|*s<49&!!s[1]);n=!puts(n?"NG":"OK");} | ^~~~~~ main.c:1:78: warning: implicit declaration of function ‘puts’ [-Wimplicit-function-declaration] 1 | n;char*t,s[];main(){for(;gets(s);n|=strtol(s,&t,0)>12345|*t|*s<49&!!s[1]);n=!puts(n?"NG":"OK");} | ^~~~ main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘puts’ +++ |+#include <stdio.h> 1 | n;char*t,s[];main(){for(;gets(s);n|=strtol(s,&t,0)>12345|*t|*s<49&!!s[1]);n=!puts(n?"NG":"OK");} main.c: At top level: main.c:1:10: warning: array ‘s’ assumed to have one element 1 | n;char*t,s[];main(){for(;gets(s);n|=strtol(s,&t,0)>12345|*t|*s<49&!!s[1]);n=!puts(n?"NG":"OK");} | ^ /usr/bin/ld: /tmp/cc3IUnlh.o: in function `main': main.c:(.text.startup+0x76): 警告: the `gets' function is dangerous and should not be used.
ソースコード
n;char*t,s[];main(){for(;gets(s);n|=strtol(s,&t,0)>12345|*t|*s<49&!!s[1]);n=!puts(n?"NG":"OK");}