Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int a=1,b=1,c,n,i,x,c1=0,z;
- cin>>n;
- z=n;
- for(z;z!=0;z--){
- cin>>x;
- a=1;
- b=1;
- for(i=1;i<=n;i++){
- c=a+b;
- if(x==c)c1=1;
- a=b;
- b=c;
- }
- if(c1==1||x==1)cout<<"DA"<<" ";
- else cout<<"NU"<<" ";
- c1=0;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement