HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Arithmetic > problem:


50159 - Triangular Numbers

Section problems

• 50077 - Valid Permutations
• 50079 - Fun Fair
• 50089 - Sum of Cubes
• 50118 - Car Parking
• 50139 - Multiplication Table - 2
• 50145 - Close City
• 50149 - Albanian Airlines
• 50150 - Divisible by m
• 50159 - Triangular Numbers
• 50162 - Mersenne prime
• 50164 - The roots of a quadratic eq...
• 50172 - Permutations and Combinat...
• 50192 - Nr of Missing Guests
• 50198 - Euro to Leke
• 50201 - Total Discount for the clients
• 50202 - Buying Books from Internet
• 50215 - ZScore normalization

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