hdoj 2006

来源:互联网 发布:win10vc6.0软件下载 编辑:程序博客网 时间:2024/06/08 03:26
#include<iostream>
using namespace std;
int main(void)
{
    int total, i, product;
    while (cin >> total)
    {
        product = 1;
        int *a = new int[total];
        for (i = 0; i < total; i++)     cin >> a[i];
        for (i = 0; i < total; i++) if (a[i] % 2 == 1) product *= a[i];
        cout << product << endl;
        delete[] a;
    }
    return 0;
}
原创粉丝点击