Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
69269 陈俊洁 12序列找规律 C++ Compile Error 0 MS 0 KB 270 2024-03-31 14:24:24

Tests(0/0):


Code:

#include <bits/stdc++.h> using namespace std; int main () { int n; cin>>n; int os=10000,js==10000 if(n%2==0){ for(int i=1;i<=(n-2)/2;i++){ os-=2 } cout<<os; } else{ for(int i=1;i<=(n-1)/2;i++){ js-=1 } cout<<js; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:6:17: error: expected initializer before '==' token
  int os=10000,js==10000
                 ^
Main.cc:6:6: warning: unused variable 'os' [-Wunused-variable]
  int os=10000,js==10000
      ^
Main.cc:21:1: error: expected '}' at end of input
 }
 ^