Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
72582 殷震轩 数列求和 C++ Compile Error 0 MS 0 KB 233 2024-05-11 18:47:37

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; int sum=0; int m=1; while(int i>50){ sum+=m; m*=2; i++; } cout<<sum<<endl; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:8:11: error: expected primary-expression before 'int'
     while(int i>50){
           ^
Main.cc:8:11: error: expected ')' before 'int'
Main.cc:8:16: error: expected initializer before '>' token
     while(int i>50){
                ^
Main.cc:7:9: warning: unused variable 'm' [-Wunused-variable]
     int m=1; 
         ^