| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 72807 | 申明宇 | 19灯的编号 | C++ | Compile Error | 0 MS | 0 KB | 417 | 2024-05-12 18:42:24 |
#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; }
Main.cc: In function 'int main()':
Main.cc:12:26: error: lvalue required as left operand of assignment
if(i%l=0 & a[i]=1){
^
Main.cc:15:25: error: lvalue required as left operand of assignment
if(i%l=0 & a[i]=0){
^
Main.cc:18:15: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if(i=0){
^