For this Question: An electronics shop sells red and blue lamps. A red lamp costs X rupees and a blue lamp costs Y rupees. John is going to buy exactly N lamps from this shop. Find the minimum amount of money John needs to pay such that at least K of the lamps bought is red.The first line of input will contain a single integer T, denoting the number of test cases. Each test case consists of a single line containing four space- separated integers N, K, X, Y.

<b>Constraints</b>
1 &le; T &le; 10<sup>3</sup>
1 &le; N &le; 10<sup>8</sup>
0 &le; K &le; N
1 &le; X, Y &le; 10For each test case, output on a new line the minimum amount of money John needs to pay in order to buy N lamps such that at least K of the lamps bought are red.Sample Input :
4
2 2 5 1
4 1 3 1
3 0 4 7
5 2 3 4
Sample Output :
10
6
12
15
Explanation :
<ul><li>John buys 2 red lamps with 2 ⋅ 5 = 10 rupees. </li><li>John buys 1 red lamp and 3 blue lamps with 1. 3 + 3 . 1 = 6 rupees. </li><li>John buys 3 red lamps with 3 ⋅ 4 = 12 rupees., I have written this Solution Code: import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in);
		int m = sc.nextInt();
		while (m > 0)
		{
		 int[] nums = new int[4];
        int i;
        for (i = 0; i < nums.length; i++) {
            nums[i] = sc.nextInt();
        }
        int n,k,x,y;
        n = nums[0]; k = nums[1]; x = nums[2]; y = nums[3]; 
         if (n == k)
         {
        System.out.println(k*x); }
    else if( k < n ) { 
       int s = k*x + (n-k)*y;
        int s1 = n*x;
        if (s <= s1 )
            System.out.println(s);
        else
            System.out.println(s1);
        
		}
		m = m -1;
		}
		
	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?