HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Repetition (Loops) > problem:


058. 50574 - Triangular Numbers

Guest
• Review clarifications (1)

Volume problems

• 024. 50372 - Number Quadruplets
• 025- 2013-Nov-01. 50328 - How far ...
• 026. 50487 - Radius of Inscribed Circle
• 027. 50548 - Albanian Airlines
• 028. 50483 - Group Total
• 033. 50588 - Processing the list of n...
• 035. 50573 - Count and Sum
• 044. 50597 - Drawing Diamonds
• 058. 50574 - Triangular Numbers
• 072. 50473 - Counting Circles Positions
• 118. 50514 - Bookkeeping
• 125. 50484 - Number Of Letters
• 132. 50504 - School contest
• 136. 50443 - Dajte Express
• 147. 50553 - Divisible by m
• 148. 50596 - Your Ride Is Here (US...
• 148. 50596 - Your Ride Is Here (US...

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