| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 | 
|---|---|---|---|---|---|---|---|---|
| 135148 | 林睿 | 求x的n次方 | C++ | Compile Error | 0 MS | 0 KB | 210 | 2025-11-02 16:49:58 | 
#include<bits/stdc++.h> using namespace std; int normal(int x,int n){ 13 int a=1; for(int i=0;i<n;i++){ a=a*x; } return a; } int main(){ int x,n; cin>>x; cout<<normal(x,n); return 0; }
Main.cc: In function 'int normal(int, int)':
Main.cc:4:2: error: expected ';' before 'int'
  int a=1;
  ^
Main.cc:4:9: warning: statement has no effect [-Wunused-value]
  int a=1;
         ^
Main.cc:6:3: error: 'a' was not declared in this scope
   a=a*x; 
   ^
Main.cc:8:9: error: 'a' was not declared in this scope
  return a;
         ^