No.1903 Day1
タグ : / 解いたユーザー数 277
作問者 : 👑
hitonanode
/ テスター :
Sumitacchan
Problem Statement
One day, you decided to conquer all the problems on yukicoder. Counting that day as day $1$, you will solve $1$ problem every day at noon.
Currently, there are $N$ problems on yukicoder that you have not solved. Also, $6$ problems are added to yukicoder at $6$ a.m. on each day that is a multiple of $7$ (day $7$, day $14$, day $21$, ...). Compute the day on which you first reach the state of having solved all the problems existing on yukicoder at that time.
Input
$N$
- $1 \le N \le 2000$
- $N$ is an integer.
Output
Output the answer as an integer, followed by a newline.
Sample
Sample 1
Input
6
Output
6
You solve $1$ problem each day from day $1$ to day $6$, and by solving the $6$th problem at noon on day $6$, you finish all the problems existing at that time.
Sample 2
Input
7
Output
13
After solving $6$ problems by day $6$, $1$ problem remains. At $6$ a.m. on day $7$, $6$ problems are added, making $7$ problems remaining. Then, you finish these $7$ problems in the $7$ days from day $7$ to day $13$.
Sample 3
Input
2000
Output
13964
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。