HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Arithmetic > problem:


50574 - Triangular Numbers

Guest
• Review clarifications (1)

Section problems

• 50553 - Divisible by m
• 50554 - nth power of m
• 50557 - nth Power of m (Long Multiply)
• 50559 - Prime Factors of a Number
• 50565 - Binary numbers
• 50568 - Body Mass Index Calculator
• 50571 - Armstrong Numbers - 2
• 50572 - Palindromic Numbers
• 50574 - Triangular Numbers
• 50578 - Mersenne prime
• 50579 - Pentagonal Numbers
• 50581 - The roots of a quadratic eq...
• 50582 - Number of digits
• 50583 - Max of 3 numbers
• 50584 - Total invoice amount
• 50585 - Inner Product
• 50587 - Modular Conversion

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