結果

問題 No.603 hel__world (2)
ユーザー testestesttestestest
提出日時 2017-11-21 00:38:51
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 427 bytes
コンパイル時間 119 ms
コンパイル使用メモリ 28,484 KB
実行使用メモリ 5,328 KB
最終ジャッジ日時 2023-08-18 16:12:36
合計ジャッジ時間 1,423 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:7:1: 警告: 戻り値の型をデフォルトの ‘int’ にします [-Wimplicit-int]
    7 | main(){
      | ^~~~
main.c: 関数 ‘main’ 内:
main.c:8:9: 警告: 関数 ‘gets’ の暗黙的な宣言です [-Wimplicit-function-declaration]
    8 |         gets(s);
      |         ^~~~
main.c:15:49: 警告: 互換性のないポインタ型から 2 番目の ‘strtoull’ の引数に渡しています [-Wincompatible-pointer-types]
   15 |                 unsigned long long x=strtoull(p,q,10);
      |                                                 ^
      |                                                 |
      |                                                 char *
次のファイルから読み込み:  main.c:3:
/usr/include/stdlib.h:206:59: 備考: expected ‘char ** restrict’ but argument is of type ‘char *’
  206 |                                         char **__restrict __endptr, int __base)
      |                                         ~~~~~~~~~~~~~~~~~~^~~~~~~~
次のファイルから読み込み:  main.c:2:
main.c:23:23: 警告: ポインタと整数との比較を行なっています
   23 |         assert(gets(s)==NULL);
      |                       ^~
/tmp/ccIlewjZ.o: In function `main':
main.c:(.text.startup+0xe): warning: the `gets' function is dangerous and should not be used.

ソースコード

diff #

#include <string.h>
#include <assert.h>
#include <stdlib.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);
}
0