Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
51496 | littletwleve | 小明三年身高 | C++ | 通过 | 0 MS | 244 KB | 279 | 2024-09-22 10:23:15 |
#include<bits/stdc++.h> using namespace std; int main(){ int year; int h[3]; int y[3]={2000,2001,2002}; for(int i=0;i<3;i++){ cin>>h[i]; } cin>>year; for(int i=0;i<3;i++){ if(year==y[i]){ cout<<h[i]<<endl; cout<<h[i]-h[i-1]; } } return 0; }