/** * Created by YangYuan on 2017/12/8. */ public class Problem2006 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); while (scanner.hasNext()) { int n = scanner.nextInt(); int result = 1; for (int i = 0; i < n; i++) { int x = scanner.nextInt(); if (x % 2 != 0) result *= x; } System.out.println(result); } } }
HDOJ 2006 求奇数的乘积
最新推荐文章于 2019-01-13 15:09:32 发布