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 26 27 28 29 30
| #include "stdio.h" #include "iostream" #include <string.h> #include <bits/stdc++.h> using namespace std; typedef long long ll; ll f[1010]; int main() { f[0]=0; f[1]=2; f[2]=3; f[3]=5; ll flag=1; for(ll i=4;i<=20;i++){ f[i]=f[i-1]+f[i-2]; } ll n; cin>>n; for(ll i=0;i<=20;i++){ if(f[i]==n){ flag=0; } } if(flag) cout<<"Small"<<endl; else cout<<"Big"<<endl; return 0; }
|