結果

問題 No.423 ハムスター語初級(数詞)
ユーザー olphe
提出日時 2016-09-22 22:27:40
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 166 bytes
コンパイル時間 368 ms
コンパイル使用メモリ 21,248 KB
実行使用メモリ 6,816 KB
最終ジャッジ日時 2024-11-17 13:36:29
合計ジャッジ時間 670 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 8 WA * 1
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:7:23: warning: multi-character character constant [-Wmultichar]
    7 |         if (ham[4] == 'NULL') {
      |                       ^~~~~~
main.cpp: In function ‘int main()’:
main.cpp:6:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    6 |         scanf("%s", ham);
      |         ~~~~~^~~~~~~~~~~

ソースコード

diff #

#include "stdio.h"

char ham[51];

int main() {
	scanf("%s", ham);
	if (ham[4] == 'NULL') {
		printf("%s", ham);
		return 0;
	}
	printf("%sham\n", ham);

	return 0;
}
0