結果
問題 |
No.603 hel__world (2)
|
ユーザー |
👑 ![]() |
提出日時 | 2017-11-21 00:34:42 |
言語 | C (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 407 bytes |
コンパイル時間 | 409 ms |
コンパイル使用メモリ | 29,184 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-27 22:39:07 |
合計ジャッジ時間 | 2,788 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 25 RE * 5 |
コンパイルメッセージ
main.c:6:1: warning: return type defaults to 'int' [-Wimplicit-int] 6 | main(){ | ^~~~ main.c: In function 'main': main.c:7:9: warning: implicit declaration of function 'gets' [-Wimplicit-function-declaration] 7 | gets(s); | ^~~~ main.c:14:38: warning: implicit declaration of function 'strtoull'; did you mean 'strcoll'? [-Wimplicit-function-declaration] 14 | unsigned long long x=strtoull(p,q,10); | ^~~~~~~~ | strcoll In file included from main.c:2: main.c:22:23: warning: comparison between pointer and integer 22 | assert(gets(s)==NULL); | ^~ /usr/bin/ld: /tmp/cceWnQrs.o: in function `main': main.c:(.text.startup+0x1e): 警告: the `gets' function is dangerous and should not be used.
ソースコード
#include <string.h> #include <assert.h> char s[10000000],*p,*q; int cnt; main(){ gets(s); p=strtok(s," "); while(p){ cnt++; int n=strlen(p); assert(1<=n&&n<=19); assert(*p!='0'||n==1); unsigned long long x=strtoull(p,q,10); assert(q==NULL&&x<=1000000000000000000ULL); p=strtok(NULL," "); } assert(cnt==26); gets(s); int n=strlen(s); assert(1<=n&&n<=1000000); assert(gets(s)==NULL); }