Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
88050 王馨桐 18高度为k的树 C++ Accepted 2 MS 304 KB 266 2024-08-17 10:16:06

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int t[1000001]; int main(){ int n; int k,sum=0; cin >>n; for(int i=0; i<=n-1; i++){ cin >>t[i]; } cin >>k; for(int i=0; i<=n-1; i++){ if(t[i]==k){ sum+=1; } } cout <<sum; return 0; }