問題一覧 > 通常問題

No.1256 Consecutive Integer Sequence

レベル : / AI推定難易度 : 500 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 265
作問者 : PCTprobability / テスター : Kak1_n0_tane
お気に入りにしたユーザー ProblemId : 5010 / 自分の提出
問題文最終更新日: 2020-10-16 21:05:37
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 270 (mathematics contest) (順位表) の他の問題:

Problem Statement

A positive integer $A$ is given. Determine whether there exists a sequence of consecutive integers of length at least $3$ such that the sum of all its elements is $A$.

Input

$A$

  • All inputs are integers.
  • $1 \le A \le 10^9$

Output

Print YES if a sequence satisfying the condition exists, and NO otherwise.

Sample

Sample 1
Input
300
Output
YES

There are $11$ sequences in total satisfying the condition, such as $99+100+101$.

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