Codeforces Beta Round 44 (Div. 2)
翻译中…
A triangular number is the number of dots in an equilateral triangle uniformly filled with dots. For example, three dots can be arranged in a triangle; thus three is a triangular number. The $*n*$-th triangular number is the number of dots in a triangle with $*n*$ dots on a side.
. You can learn more about these numbers from Wikipedia (http://en.wikipedia.org/wiki/Triangular_number).
翻译中…
Your task is to find out if a given integer is a triangular number.
翻译中…
Input
翻译中…
The first line contains the single number $*n*$ ($1 ≤ *n* ≤ 500$) — the given integer.
翻译中…
Output
翻译中…
If the given integer is a triangular number output YES, otherwise output NO.
翻译中…
样例
Input #1
1
Output #1
YES
InputCopy
OutputCopy
Input #2
2
Output #2
NO
InputCopy
OutputCopy
Input #3
3
Output #3
YES
InputCopy
OutputCopy
题目信息
标签
暴力
数学
题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。