HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Repetition (Loops) > problem:


058. 50574 - Triangular Numbers

Guest
• Review clarifications (1)

Volume problems

• 028. 50483 - Group Total
• 030. 50584 - Total invoice amount
• 033. 50588 - Processing the list of n...
• 035. 50573 - Count and Sum
• 040. 50335 - Five Math Operators
• 044. 50597 - Drawing Diamonds
• 045. 50462 - Class Average (3 Gra...
• 050. 50450 - Last Appereance of a ...
• 058. 50574 - Triangular Numbers
• 060. 50362 - Pythagorean Numbers
• 060. Problem 2
• 065. 50394 - Water Bills
• 070. 50465 - How many students h...
• 072. 50473 - Counting Circles Positions
• 074. 50396 - Cinema Tickets - 1
• 075. 50363 - Class GPA Average
• 080. 50248 - Power of two

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.

Triangular Numbers

Shqip

Square Numbers are the numbers which can be represented as a square; like 4, 16 or 25.

Triangular Numbers are similar to square numbers but they form a triangle.

Write a program that is going to accept an integer number and decide if the number is a triangular number or not.

Input specification
There will be just one integer number n where 1 ≤ n ≤ 1 billion.

Output specification
Print out "YES" if the given number is a triangular number. "NO", otherwise.

Sample Input:
5

Sample Output:
NO

Sample Input:
21

Sample Output:
YES


Для отправки решений необходимо выполнить вход.

www.contester.ru