Optimise/modify as you like, and oh tell me the system that you'll use too(other than this)
#include <cstdlib>
#include <iostream>
using namespace std;
long rec(long s)
{
long i;
if (s==0){ cout<<"0"<<endl; return 0; }
for (i=2;i<=(s/2);i++)
{
if (s % i == 0)...