8 条题解
-
0
#include <bits/stdc++.h> using namespace std; int main () { long long n, a = 1, b = 1, c; scanf ("%lld", &n); if (n == a) { printf ("YES"); exit (0); } while (1) { c = a + b; a = b; b = c; if (n == c) { printf ("YES"); exit (0); } if (c > n) { printf ("NO"); exit (0); } } return 0; }
信息
- ID
- 9
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 3
- 标签
- (无)
- 递交数
- 102
- 已通过
- 55
- 上传者