Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
123915 陈华仁星 12序列找规律 C++ Compile Error 0 MS 0 KB 242 2025-07-10 14:55:14

Tests(0/0):


Code:

ng namespace std; int main() { int n,m=10000; scanf("%d",&n); if(n%2==0) { for(int i=1;i<=n/2-1;i++) { m-=2; } } else { for(int i=1;i<=n/2;i++) { m-=1; } } printf("%d",m); return 0; }


Run Info:

Main.cc:1:1: error: 'ng' does not name a type
 ng namespace std;
 ^
Main.cc: In function 'int main()':
Main.cc:6:15: error: 'scanf' was not declared in this scope
  scanf("%d",&n);
               ^
Main.cc:21:15: error: 'printf' was not declared in this scope
  printf("%d",m);
               ^