Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
80961 张黄源 19灯的编号 C++ Compile Error 0 MS 0 KB 330 2024-07-11 17:12:55

Tests(0/0):


Code:

#include <iostream> using namespace std; int arr[5001]; int main() { int n, m; cin >> n >> m; for(int i=1; i<=m) { for(int j=1; j<=n; j++) { if(j%i==0) { arr[j]==1; } else { arr[j]=0; } } } cout<<1; for(int j=1; j<=n; j++) { if(arr[j]==1) { cout<<','<<j; } } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:19: error: expected ';' before ')' token
  for(int i=1; i<=m) {
                   ^
Main.cc:10:11: warning: statement has no effect [-Wunused-value]
     arr[j]==1;
           ^