問題一覧 > 通常問題

No.1903 Day1

レベル : / AI推定難易度 : 130 / 実行時間制限 : 1ケース 1.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 277
作問者 : 👑 hitonanode / テスター : Sumitacchan
お気に入りにしたユーザー ProblemId : 7722 / 自分の提出
問題文最終更新日: 2022-04-26 01:19:53
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 339 (順位表) の他の問題:

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