Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
102621 | 朱安然 | 18高度为k的树 | C++ | Accepted | 3 MS | 308 KB | 256 | 2024-12-22 12:44:46 |
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int a[n]; for(int i=0;i<=n-1;i++){ cin>>a[i]; } int e=0; int d; cin>>d; for(int i=0;i<=n-1;i++){ if(a[i]==d){ e=e+1; } } cout<<e; return 0; }