Submit | All submissions | Best solutions | Back to list |
ISFIB - Fibonacci check |
Wersja polska | English version |
For given number x check if it is Fibonacci number.
Input
There is unknown number of tests. Each test consist of one integer x (0<x<1012).
Output
For each test print YES is x is Fibonacci number or NO otherwise.
Example
Input:
1
2
3
4
5
Output:
YES
YES
YES
NO
YES
Added by: | Piotr Kąkol |
Date: | 2010-10-10 |
Time limit: | 1.197s-4.947s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: SCM qobi |
hide comments
2014-05-19 09:58:08 Mitch Schwartz
The last line isn't terminated with a newline for at least one input file? Edit: Thanks for updating the input :) Last edit: 2014-09-14 03:03:28 |
|
2013-08-29 19:18:57 Mitch Schwartz
@ওয়াসী (Wasi): Congrats :) |
|
2013-08-27 06:23:03 ওয়াসী (Wasi)
Congrats! @Mitch I knew you're going to come up with a better AWK solution but 45B is pretty insane ;) Edit: reached 45B! :D Last edit: 2013-08-29 17:11:10 |
|
2013-08-10 01:55:06 Piotr KÄ…kol
@orange - You should read like this: while(scanf(...) > 0)
|
|
2013-07-07 16:28:09 orange
I don't know why it's TLE.is EOF present there na?? Last edit: 2013-07-07 16:28:41 |
|
2010-12-17 22:05:22 Piotr KÄ…kol
Yes. |
|
2010-12-17 14:04:56 Batzorig
at this task will i use "EOF" ? |