結果
| 問題 | 
                            No.9001 標準入出力の練習問題(テスト用)
                             | 
                    
| ユーザー | 
                             y_taira_c
                         | 
                    
| 提出日時 | 2017-06-21 21:52:33 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 1 ms / 1,000 ms | 
| コード長 | 145 bytes | 
| コンパイル時間 | 338 ms | 
| コンパイル使用メモリ | 22,656 KB | 
| 実行使用メモリ | 6,816 KB | 
| 最終ジャッジ日時 | 2024-10-02 11:49:41 | 
| 合計ジャッジ時間 | 687 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 2 | 
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:9:21: warning: format ‘%s’ expects argument of type ‘char*’, but argument 4 has type ‘char (*)[11]’ [-Wformat=]
    9 |         scanf("%d%d%s", &a, &b, &c);
      |                    ~^           ~~
      |                     |           |
      |                     char*       char (*)[11]
main.cpp:9:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    9 |         scanf("%d%d%s", &a, &b, &c);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~
            
            ソースコード
#include <cstdio>
using namespace std;
int main()
{
	int a,b;
	char c[11];
	scanf("%d%d%s", &a, &b, &c);
	printf("%d %s\n",a+b,c);
	return 0;
}
            
            
            
        
            
y_taira_c