問題一覧 > 通常問題

No.2480 Sequence Sum

レベル : / AI推定難易度 : 900 / 実行時間制限 : 1ケース 0.500秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 145
作問者 : keisuke6 / テスター : ytqm3
お気に入りにしたユーザー ProblemId : 9270 / 自分の提出
問題文最終更新日: 2023-09-22 19:39:10
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 405 技術室奥プログラミングコンテスト#7 Day1 (順位表) の他の問題:

Problem Statement

Find the number of distinct possible lengths of sequences satisfying the following conditions.

  • The sum is $N$.
  • The elements that appear are of exactly $2$ distinct values, which are positive integers and adjacent numbers.

Input

$N$

Constraints

  • $1 \leq N \leq 10^9$
  • All inputs are integers.

Output

Output the answer on $1$ line.

Sample

Sample 1
Input
8
Output
4

For example, the sequence $(3,2,3)$ satisfies the conditions. Others such as $(1,1,2,1,1,1,1)$ also satisfy the conditions.

Sample 2
Input
12
Output
6

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。