http://acm.hdu.edu.cn/showproblem.php?pid=2006
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
while(cin>>n)
{
int sum=1;
for(int i=1; i<=n; i++)
{
int x;
cin>>x;
if(x%2!=0)
sum*=x;
}
cout<<sum<<endl;
}
return 0;
}
原文:https://www.cnblogs.com/zlrrrr/p/9207096.html