41545864564351563

nztao  •  1年前


#include <iostream>
using namespace std;

int main() {
    int apple_heights[10];
    for (int i = 0; i < 10; ++i) {
        cin >> apple_heights[i];
    }

    int reach_height;
    cin >> reach_height;

    int count = 0;
    for (int i = 0; i < 10; ++i) {
        if (apple_heights[i] <= reach_height + 30) {
            count += 1;
        }
    }

    cout << count << endl;

    return 0;
}

评论:

请先登录,才能进行评论