#33052: c++ ans陣列


yp11151097@yphs.tp.edu.tw (808-30施耀登)

學校 : 臺北市私立延平高級中學
編號 : 197083
來源 : [203.72.178.1]
最後登入時間 :
2023-06-09 13:54:26
b138. NOIP2005 1.陶陶摘苹果 -- NOIP2005普及組 | From: [203.72.178.2] | 發表日期 : 2022-11-25 13:10

#include<bits/stdc++.h>
using namespace std;
main(){
int a[10];
for(int i=0;i<10;i++) cin>>a[i];
int x;
cin>>x;
int count=0;
for(int j=0;j<10;j++)
if(x+30>=a[j]) count++;
cout<<count<<endl;
}

 
ZeroJudge Forum