提交时间:2025-12-05 15:41:48

运行 ID: 75293

#include <iostream> #include <vector> using namespace std; int main() { vector<int> apple_heights(10); int max_hand_height; for (int i = 0; i < 10; i++) { cin >> apple_heights[i]; } cin >> max_hand_height; int count = 0; for (int height : apple_heights) { if (height <= max_hand_height || height <= max_hand_height + 30) { count++; } } cout << count << endl; return 0; }