package javacode; import java.util.Scanner; public class yukicoder2 { public static void main(String args[]){ Scanner cin = new Scanner(System.in); int target = cin.nextInt(); int tmp[] =new int[target]; boolean issmall[] = new boolean[target]; int result=0; for(int i=0;i0){ result = tmp[k]; }else if(result ==0 && tmp[k]==0){ }else if(result > 0 && tmp[k]==0){ }else{ if(issmall[k]){ result += tmp[k]; }else{ result *= tmp[k]; } } } System.out.println(result); } }