2019ECNU机试03 发表于 2020-04-12 | 分类于 华师机试 | 评论数: | 热度: ℃ 本文字数: 2.3k | 阅读时长 ≈ 2 分钟 Code12345678910111213141516171819202122232425#include <iostream>using namespace std;void main(){ int n; scanf("%d",&n); int first=1,second=1,temp; bool flag =false; while(1){ temp = first+second; if(temp>=n){ if(temp==n) flag=true; break; } first = second; second =temp; } if(flag) printf("Yes\n"); else printf("No\n");} ----\(˙<>˙)/----赞赏一下吧~ 打赏 微信支付 支付宝 本文作者: wicherQAQ 本文链接: https://wicherqaq.github.io/2020/04/12/2019ECNU%E6%9C%BA%E8%AF%9503/ 版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明出处!