暂无公告No announcement
1015: 湖南省第十八届大学生计算机程序设计竞赛(HNCPC2022) - Semilive
开始时间Start Time
比赛类型Contest Type
2023-04-02 14:30:00
结束时间End Time
2023-04-02 19:30:00
当前时间Current Time
2026-05-06 21:16:53
比赛状态Contest Status
公开Public
榜单状态Rank Status
公告 Announcement
J (1198) : Fibonacci Cane
时间限制Time Limit
1
秒Sec
内存限制Memory Limit
128
兆MB
提交次数Submitted
336
次Times
通过次数Solved
147
次Times
标准评测Standard Judge
题目描述Description
Bob likes Fibonacci numbers too much. When he buys sugar canes, he hopes that the length of the sugar cane is a continuous sum of Fibonacci sequence.
Fibonacci sequence is a sequence that: f_{0}=1, f_{1}=1,\dots , f_{n}=f_{n-1}+f_{n-2}.
He asks you to help determine whether a sugar cane is what he wants.
输入格式Input
No more than 1000 test cases. Each case contains a
positive integer n, the length of a sugar cane.
1 \leq n \leq 10^{15}
输出格式Output
Output YES if the length is a continuous sum of the
Fibonacci sequence, otherwise output NO.