Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
61616 王一涵(吃土豆长大的马铃薯) 小明十年身高 C++ 通过 0 MS 244 KB 344 2025-03-06 16:46:52

Tests(1/1):


#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; }


测评信息: