結果
| 問題 |
No.9001 標準入出力の練習問題(テスト用)
|
| ユーザー |
|
| 提出日時 | 2019-03-07 00:41:44 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 0 ms / 1,000 ms |
| コード長 | 197 bytes |
| コンパイル時間 | 186 ms |
| コンパイル使用メモリ | 22,272 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-23 14:41:56 |
| 合計ジャッジ時間 | 491 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:12: warning: zero-length gnu_printf format string [-Wformat-zero-length]
6 | printf("");
| ^~
main.cpp:8:12: warning: zero-length gnu_printf format string [-Wformat-zero-length]
8 | printf("");
| ^~
main.cpp:9:13: warning: format ‘%s’ expects argument of type ‘char*’, but argument 2 has type ‘char (*)[9]’ [-Wformat=]
9 | scanf("%s",&str);
| ~^ ~~~~
| | |
| | char (*)[9]
| char*
main.cpp:7:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%d %d",&A, &B);
| ~~~~~^~~~~~~~~~~~~~~~
main.cpp:9:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
9 | scanf("%s",&str);
| ~~~~~^~~~~~~~~~~
ソースコード
#include<stdio.h>
int main(){
int A, B, sum;
char str[9];
printf("");
scanf("%d %d",&A, &B);
printf("");
scanf("%s",&str);
sum = A + B;
printf("%d %s", sum, str);
}