2019ECNU机试03

Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#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");
}

----\(˙<>˙)/----赞赏一下吧~