Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
72797 申明宇 19灯的编号 C++ Compile Error 0 MS 0 KB 419 2024-05-12 18:33:36

Tests(0/0):


Code:

#include<iostream> #include<cstdio> using namespace std; int main(){ int n,m,l=0; cin>>n; cin>>m; int a[n]={0}; for(int i=0;i<=n;i++){ l++; if(i%l=0 & a[i]=1){ a[i]=a[i]-1; } if(i%l=0 & a[i]=0){ a[i]=a[i]+1; } if(i=0){ cout<<a[i]<<","; } } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:13:26: error: lvalue required as left operand of assignment
         if(i%l=0  &  a[i]=1){
                          ^
Main.cc:16:25: error: lvalue required as left operand of assignment
         if(i%l=0  & a[i]=0){
                         ^
Main.cc:19:15: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
         if(i=0){
               ^