For this Question: Given an array Arr of N integers. Find the number of subarrays of this array that are powerful.
A subarray [L, R] (1 <= L <= R <= N) is said to be powerful if the product A<sub>L</sub> * A<sub>L+1</sub> * ... * A<sub>R-1</sub> * A<sub>R</sub> is odd.The first line of input contains a single integer N
The second line of input contains N integers representing the elements of the array Arr
 
<b>Constraints </b>
1  <= N <= 100000
1 <= Arr[i] <= 100000Output the number of powerful subarrays of array Arr.Sample Input 1 
5
2 4 4 5 3 

Sample output 1
3

Sample Input 2
3
1 5 1 

Sample Output 2
6

<b>Explanation:</b>
(3), (5), (3, 5) are the required subarrays.
(1), (2), (1), (1, 5), (5, 1]) (1, 5, 1) are the required subarrays., I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
	public static void main (String[] args)throws IOException {
        InputStreamReader inputStreamReader=new InputStreamReader(System.in);
		BufferedReader reader=new BufferedReader(inputStreamReader);
		int n =Integer.parseInt(reader.readLine());

		String str=reader.readLine();
		String[] strarr=str.split(" ");
		int[] arr=new int[n];
		for(int i=0;i<n;i++){
            arr[i]=Integer.parseInt(strarr[i]);
		}
		long noOfsubArrays=0;
		int start=0;
		boolean sFlag=false;
		for(int i=0;i<n;i++){
			if(arr[i]%2!=0){
               if(!sFlag){
				   start=i;
				   noOfsubArrays++;
				   sFlag=true;
				   continue;
			   }
			   noOfsubArrays+=2;
			   int temp=start;
			   temp++;
			   while(temp<i){
				   temp++;
				   noOfsubArrays++;
			   }
			}else if(arr[i]%2==0 && sFlag){
				sFlag=false;
			}
		}
		System.out.println(noOfsubArrays);
	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?