2022.11.18 PM 06:30 by CBJ
來源 : https://zerojudge.tw/ShowProblem?problemid=d049 出題者 : snail蝸牛 標籤 : 基礎運算 難易度 : 1
解題想法 : (民國年 = 西元年 - 1911),了解此公式以後即可解出此題。
//C language
//solution link(含註解):
#include<stdio.h>
int main(){
int n;
scanf("%d",&n);
printf("%d",n-1911);
return 0;
}

//C++ language
//solution link(含註解):
#include<iostream>
using namespace std;
int main(){
int n;
cin>>n;
cout<<n-1911<<"\n";
return 0;
}

## Python language
## solution link(含註解):
print(int(input())-1911)

發佈留言