Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
104751 | 胡海峰老师 | 07判断奇数 | C++ | Compile Error | 0 MS | 0 KB | 166 | 2025-01-10 10:43:55 |
#include <iostream> using namesapce std; int main(){ int n; cin>>n; if(n%2==1) cout<<"Yes"; else cout<<"No"; return 0; }
Main.cc:2:7: error: expected nested-name-specifier before 'namesapce' using namesapce std; ^ Main.cc: In function 'int main()': Main.cc:5:5: error: 'cin' was not declared in this scope cin>>n; ^ Main.cc:5:5: note: suggested alternative: In file included from Main.cc:1:0: /usr/include/c++/5/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ Main.cc:7:9: error: 'cout' was not declared in this scope cout<<"Yes"; ^ Main.cc:7:9: 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:9:9: error: 'cout' was not declared in this scope cout<<"No"; ^ Main.cc:9:9: 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 ^