結果

問題 No.9001 標準入出力の練習問題(テスト用)
ユーザー KamutaroKamutaro
提出日時 2019-06-02 15:54:13
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 215 bytes
コンパイル時間 544 ms
コンパイル使用メモリ 56,596 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-17 23:03:02
合計ジャッジ時間 887 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main(int, char**)’:
main.cpp:14:21: warning: format ‘%s’ expects argument of type ‘char*’, but argument 3 has type ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} [-Wformat=]
   14 |         printf("%d %s", (a + b), s);
      |                    ~^
      |                     |
      |                     char*

ソースコード

diff #

#include <iostream>
#include <string>
#include <stdio.h>

using namespace std;

int main(int argc, char* argv[]) {

	int a, b;
	string s;
	cin >> a >> b;
	getline(cin, s);

	printf("%d %s", (a + b), s);
	return 0;
}
0