結果
| 問題 |
No.9001 標準入出力の練習問題(テスト用)
|
| ユーザー |
Kamutaro
|
| 提出日時 | 2019-06-02 15:54:13 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 215 bytes |
| コンパイル時間 | 354 ms |
| コンパイル使用メモリ | 57,012 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-17 20:11:28 |
| 合計ジャッジ時間 | 787 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge6 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 2 |
コンパイルメッセージ
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*
ソースコード
#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;
}
Kamutaro