#include <cstdio> #include <iostream> using namespace std; int minani(int feet){ if(feet%4==0){ return feet/4; } else if(feet%4==2){ return feet/4+1; } else return 0; } int maxani(int feet){ if(feet%2==0){ return feet/2; } else return 0; } int main(){ int feet; cin>>feet; int min; int max; min=minani(feet); max=maxani(feet); cout<<min<<" "<<max; return 0; } |
Double click to view unformatted code.