| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 79412 | 王郡翊 | 19灯的编号 | C++ | Compile Error | 0 MS | 0 KB | 1001 | 2024-07-05 18:18:26 |
#include <iostream> #include <cstdio> using namespace std; int main() { int N,M,s=0,q=0; cin>>N>>M; return 0; for(int i=1;i<=N;i++) { a[i]=-1; } for(int i=2;i<=M;i++) { for(int j=1;j<=N;j++) { if(j%i==0) a[j]*=-1; } } for(int i=1;i<=N;i++) { if(a[i]==-1) { cout<<i; q=1; } else cout<<","<<i; } } return 0; }
Main.cc:2:19: warning: extra tokens at end of #include directive
#include using namespace std;
^
Main.cc: In function 'int main()':
Main.cc:5:5: error: 'cin' was not declared in this scope
cin>>N>>M;
^
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:8:29: error: 'a' was not declared in this scope
for(int i=1;i<=N;i++) { a[i]=-1;
^
Main.cc:13:66: error: 'a' was not declared in this scope
for(int j=1;j<=N;j++) { if(j%i==0) a[j]*=-1;
^
Main.cc:19:60: error: 'a' was not declared in this scope
if(a[i]==-1)
^
Main.cc:20:59: error: 'cout' was not declared in this scope
{ cout<