Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
148236 张锦程 笨鸟先飞 C++ Compile Error 0 MS 0 KB 363 2026-02-10 08:58:16

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int num,a; long long sum=0; int temp=1; cin>>num; getchar(); while(num--){ cin>>a; getchar(); if(a>0;){ for(int i=1;i<=a;i++){ temp=1+2*(i-1); sum+=temp; } cout<<(sum%10000)<<endl; sum==0; continue; } }return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:12:11: error: expected ')' before ';' token
     if(a>0;){
           ^
Main.cc:12:12: error: expected primary-expression before ')' token
     if(a>0;){
            ^
Main.cc:5:15: warning: unused variable 'sum' [-Wunused-variable]
     long long sum=0;
               ^
Main.cc:6:9: warning: unused variable 'temp' [-Wunused-variable]
     int temp=1;
         ^