Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
142382 李亭绪 18高度为k的树 C++ Compile Error 0 MS 0 KB 445 2026-01-07 19:25:48

Tests(0/0):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ long long a[1000001],n,k,s=;0; cin>>n; for(int i=1;i<=n;i++) cin>>a[i]; cin>>k; for(int i=1;i<=n;i++){ if(a[i]==k) s++; } cout<<s; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:8:32: error: expected primary-expression before ';' token
     long long a[1000001],n,k,s=;0;
                                ^
Main.cc:8:34: warning: statement has no effect [-Wunused-value]
     long long a[1000001],n,k,s=;0;
                                  ^