問題一覧 > 通常問題

No.857 素振り

レベル : / 実行時間制限 : 1ケース 1.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 496
作問者 : nmnmnmnmnmnmnm / テスター : yuki2006
お気に入りにしたユーザー ProblemId : 3141 / 自分の提出
問題文最終更新日: 2019-08-09 18:26:41
Practice Swings
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
yukicoder contest 219 (順位表) の他の問題:

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もしくは右上の雲マークをクリックしてアカウントを作成してください。