No.530 Ages Change Every Year, So They're Hard to Remember
問題文最終更新日: 2026-06-26 06:06:58
English (AI translation)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence.
Back to the original
yukicoder contest 167
(順位表)
の他の問題:
Problem Statement
You are given the birth year $Y$ of yuki. For simplicity, assume that the birthday is month $1$, day $1$. On behalf of yuki, calculate yuki's age as of year $2017$, month $6$, day $23$.
Input
Y
The input $Y$ satisfies $1970 \le Y \le 2017$.
Output
Output yuki's current age. Print a newline at the end.
Sample
Sample 1
Input
1997
Output
20
A person born in the year $1997$ is currently $20$ years old.
Sample 2
Input
2017
Output
0
Age starts counting from $0$.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
はむこ