90分 求大佬帮助

P1046 [NOIP2005 普及组] 陶陶摘苹果

努力学习ACM @ 2019-03-04 19:26:18

#include <iostream>

using namespace std;

int main()
{
    int tall[10] = {}  ;
    int  height ;
    int count = 0;
    for ( int i = 0 ; i < 10 ; i ++){
        cin >> tall[i] ;
    }
    cin >> height;
    for ( int x = 0 ; x < 10 ; x ++ ){
        if (tall[x] < height + 30) count ++ ;
    }
    cout << count << endl;
    return 0;
}

by aminoas @ 2019-03-04 19:28:26

#include <iostream>

using namespace std;

int main()
{
    int tall[10] = {}  ;
    int  height ;
    int count = 0;
    for ( int i = 0 ; i < 10 ; i ++){
        cin >> tall[i] ;
    }
    cin >> height;
    for ( int x = 0 ; x < 10 ; x ++ ){
        if (tall[x] <= height + 30) count ++ ;
    }
    cout << count << endl;
    return 0;
}

by aminoas @ 2019-03-04 19:28:53

@努力学习ACM


by aminoas @ 2019-03-04 19:29:20

番外话:我不是大佬


by peppaking8 @ 2019-03-04 19:32:26

@2018J1605 YES YOU ARE


by 努力学习ACM @ 2019-03-04 19:33:30

@2018J1605 好哒 谢谢


by aminoas @ 2019-03-04 19:34:02

@努力学习ACM

YOU ARE WELCOME...


by 赤霞QvQ @ 2019-03-04 20:00:23

@2018J1605 Yes you are


by 赤霞QvQ @ 2019-03-04 20:00:40

@2018J1605 你就是大佬,别说了


by aminoas @ 2019-03-04 20:02:43

@无赖学哥

我真的不是啊啊啊啊啊啊


by Baoyanchen @ 2019-03-09 20:16:37

@努力学习ACM #include<bits/stdc++.h> using namespace std; int a[10]; int main() { int h,s=0,b=30; for(int i=0;i<=9;i++) { cin>>a[i]; } cin>>h; for(int i=0;i<=9;i++) { if(h+b>=a[i]) s++; } cout<<s<<endl; return 0; }


| 下一页