結果

問題 No.552 十分簡単な星1の問題
ユーザー ctf_tte_oisino
提出日時 2017-11-01 23:04:31
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 137 bytes
コンパイル時間 209 ms
コンパイル使用メモリ 22,656 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-22 14:43:56
合計ジャッジ時間 1,311 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 47
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:5:7: warning: ‘char* gets(char*)’ is deprecated [-Wdeprecated-declarations]
    5 |   gets(s);
      |   ~~~~^~~
In file included from /usr/include/stdio.h:894,
                 from main.cpp:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:240:1: note: declared here
  240 | gets (char *__str)
      | ^~~~
main.cpp:5:7: warning: ignoring return value of ‘char* gets(char*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    5 |   gets(s);
      |   ~~~~^~~
/usr/bin/ld: /tmp/ccIKTQLb.o: in function `main':
main.cpp:(.text.startup+0x26): 警告: the `gets' function is dangerous and should not be used.

ソースコード

diff #

#include <stdio.h>
#include <string.h>
int main(void){
  char s[90];
  gets(s);
	if(strcmp(s,"0")==0)puts("0");
	else printf("%s0",s);
}
0