Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
51496 | littletwleve | 小明三年身高 | C++ | Accepted | 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; }