結果
| 問題 | No.552 十分簡単な星1の問題 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-04-21 23:15:48 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 118 bytes |
| 記録 | |
| コンパイル時間 | 102 ms |
| コンパイル使用メモリ | 27,392 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-27 05:29:30 |
| 合計ジャッジ時間 | 1,369 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 47 |
コンパイルメッセージ
main.c: In function 'main':
main.c:1:27: warning: implicit declaration of function 'gets' [-Wimplicit-function-declaration]
1 | int main(void){char n[32];gets(n);if(strlen(n)!=1||n[0]!='0'){int a=strlen(n);n[a]='0';n[a+1]='\0';}puts(n);return 0;}
| ^~~~
main.c:1:38: warning: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
1 | int main(void){char n[32];gets(n);if(strlen(n)!=1||n[0]!='0'){int a=strlen(n);n[a]='0';n[a+1]='\0';}puts(n);return 0;}
| ^~~~~~
main.c:1:1: note: include '<string.h>' or provide a declaration of 'strlen'
+++ |+#include <string.h>
1 | int main(void){char n[32];gets(n);if(strlen(n)!=1||n[0]!='0'){int a=strlen(n);n[a]='0';n[a+1]='\0';}puts(n);return 0;}
main.c:1:38: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
1 | int main(void){char n[32];gets(n);if(strlen(n)!=1||n[0]!='0'){int a=strlen(n);n[a]='0';n[a+1]='\0';}puts(n);return 0;}
| ^~~~~~
main.c:1:38: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:1:101: warning: implicit declaration of function 'puts' [-Wimplicit-function-declaration]
1 | int main(void){char n[32];gets(n);if(strlen(n)!=1||n[0]!='0'){int a=strlen(n);n[a]='0';n[a+1]='\0';}puts(n);return 0;}
| ^~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'puts'
+++ |+#include <stdio.h>
1 | int main(void){char n[32];gets(n);if(strlen(n)!=1||n[0]!='0'){int a=strlen(n);n[a]='0';n[a+1]='\0';}puts(n);return 0;}
/usr/bin/ld: /tmp/ccjZnMrI.o: in function `main':
main.c:(.text.startup+0xe): 警告: the `gets' function is dangerous and should not be used.
ソースコード
int main(void){char n[32];gets(n);if(strlen(n)!=1||n[0]!='0'){int a=strlen(n);n[a]='0';n[a+1]='\0';}puts(n);return 0;}