k863.
清朝年號轉換
--
板橋高中教學題
| From: [203.72.178.1] |
發表日期
:
2023-11-02 17:40
#include <iostream>
using namespace std;
int main(int argc, char** argv) {
string a;
int year;
cin>>a>>year;
if (a=="ShunZhi") cout<<1644+year-1;
else if(a=="KangXi") cout<<1662+year-1;
else if(a=="YongZheng") cout<<1723+year-1;
else if(a=="QianLong") cout<<1736+year-1;
else if(a=="JiaQing") cout<<1796+year-1;
else if(a=="DaoGuang") cout<<1821+year-1;
else if(a=="XianFeng") cout<<1851+year-1;
else if(a=="TongZhi") cout<<1862+year-1;
else if(a=="GuangXu") cout<<1875+year-1;
else if(a=="XuanTong") cout<<1909+year-1;
else cout<<" ";
return 0;
}