結果
問題 | No.423 ハムスター語初級(数詞) |
ユーザー |
![]() |
提出日時 | 2016-10-17 13:27:26 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 148 bytes |
コンパイル時間 | 97 ms |
コンパイル使用メモリ | 20,096 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-22 13:11:21 |
合計ジャッジ時間 | 579 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 9 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:6:12: warning: implicit declaration of function ‘strcmp’ [-Wimplicit-function-declaration] 6 | if(strcmp(n, "ham") != 0){ | ^~~~~~ main.c:2:1: note: include ‘<string.h>’ or provide a declaration of ‘strcmp’ 1 | #include <stdio.h> +++ |+#include <string.h> 2 | main.c:5:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 5 | scanf("%s", n); | ^~~~~~~~~~~~~~
ソースコード
#include <stdio.h>int main(void) {char n[51];scanf("%s", n);if(strcmp(n, "ham") != 0){printf("%s", n);}printf("ham\n");return 0;}