| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 142936 | 伊建润 | 02简单两数相加 | C++ | Compile Error | 0 MS | 0 KB | 109 | 2026-01-11 17:15:17 |
#include <iostream> int main() { int a,b, cin>>a>>b; cout << a+b << endl; return 0; }
Main.cc: In function 'int main()':
Main.cc:4:8: error: expected initializer before '>>' token
cin>>a>>b;
^
Main.cc:5:5: error: 'cout' was not declared in this scope
cout << a+b << endl;
^
Main.cc:5:5: note: suggested alternative:
In file included from Main.cc:1:0:
/usr/include/c++/5/iostream:61:18: note: 'std::cout'
extern ostream cout; /// Linked to standard output
^
Main.cc:5:20: error: 'endl' was not declared in this scope
cout << a+b << endl;
^
Main.cc:5:20: note: suggested alternative:
In file included from /usr/include/c++/5/iostream:39:0,
from Main.cc:1:
/usr/include/c++/5/ostream:590:5: note: 'std::endl'
endl(basic_ostream<_CharT, _Traits>& __os)
^