Code Golf Challenge P3 - Equation Madness

View as PDF

Submit solution

Points: 7 (partial)
Time limit: 1.0s
Memory limit: 64M

Author:
Problem type

I define an integer y a good number if there is some integer x that satisfies the equation x^2+x = y.

Given the integer y, can you tell me if it is a good number or not?

Input Specification

The first line and only line will contain the integer y (1 \le y \le 10^{18}).

Output Specification

Print Y if the integer is a good number, and N otherwise.

Scoring

Let L represent the number of characters in your solution.

If L is less than 70 characters, your score will be \min(1, 1-\frac{L-49}{70}) \times 100\%.

If L is greater than or equal to 70, and less than 1 000, your score is (\frac{70}{L})^2 \times 70\%.

Otherwise, your score is 0.

Sample Input 1

6

Sample Output 1

Y

Sample Input 2

10

Sample Output 2

N

Comments

There are no comments at the moment.