結果

問題 No.9001 標準入出力の練習問題(テスト用)
ユーザー mizupica
提出日時 2018-01-27 19:10:33
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 147 bytes
コンパイル時間 195 ms
コンパイル使用メモリ 21,632 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-29 06:58:30
合計ジャッジ時間 624 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 2
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:7:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 |         scanf("%4d,%4d\n",&A,&B);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~
main.cpp:8:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 |         scanf("%10s",str);
      |         ~~~~~^~~~~~~~~~~~

ソースコード

diff #

#include<stdio.h>

int main(void)
{
	int A,B;
	char str[10];
	scanf("%4d,%4d\n",&A,&B);
	scanf("%10s",str);
	printf("%d %s",A+B,str);
	return 0;
}
0