No.857 素振り
タグ : / 解いたユーザー数 496
作問者 :
nmnmnmnmnmnmnm
/ テスター :
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. Show the original
Problem Statement
Yuki has decided to do practice swings once a day, at 1 o'clock.
At 0 o'clock when day 1 begins, the number of practice swings is 0, and he starts swinging on day 1.
However, he takes a break from practice swings on day $X$ and day $Y$ only (this may include day 1).
How many practice swings has Yuki done at the end of day $Z$?
Input
$X$ $Y$ $Z$
$X$, $Y$, $Z$ are positive integers. $1 \le X < Y \le 10^{18}$. $1 \le Z \le 10^{18}$.
Output
Output the answer, followed by a newline.
Sample
Sample 1
Input
2 5 4
Output
3
He did 1 practice swing on day 1.
He took a break from practice swings on day 2.
He did 1 practice swing on day 3.
He did 1 practice swing on day 4.
At the end of day 4, he has done 3 practice swings.
Sample 2
Input
1 2 1
Output
0
He takes a break from practice swings on both day 1 and day 2.
At the end of day 1, Yuki has not done a single practice swing.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。