eolymp
bolt
Try our new interface for solving problems
published at 1/12/24, 2:31:24 pm

include <iostream>

include <cmath>

using namespace std;

int main() { long long n; long long hasil=1; long long say=0; cin>>n; while(n!=0){ long long son=n%10; n=n/10; if(son%2!=0){ hasil=hasil*son; say++; } } if(say!=0){ cout<<hasil;
} else{ cout<<"-1";
}

return 0;

}