提交时间:2025-03-06 16:46:52
运行 ID: 61616
#include<bits/stdc++.h> using namespace std; int main() { int heights[10]; int year; for(int i=0;i<10;i++){ cin>>heights[i]; } cin>>year; int index=year-2000; cout<<heights[index]<<endl; if(year==2000){ cout<<"0"<<endl; }else{ int growth=heights[index]-heights[index-1]; cout<<growth<<endl; } return 0; }