CodeLibrary/09_Clion_Cplus_work_20240620/template.cpp
2024-06-22 23:31:01 +08:00

17 lines
325 B
C++

#include <iostream>
using namespace std;
int main(){
int n, maxNum, minNum;
cin >> n;
if (n % 2 != 0){
maxNum = 0;
minNum = 0;
}
else if (n % 4 == 0) {maxNum = n/2; minNum = n/4;}
else {maxNum = n/2; minNum = (n-2)/4 +1;}
cout << maxNum << "," << minNum << endl;
return 0;
}