Help me in solving BMJ206 problem

My issue

why is it wrong tho output is right?

My code

// Update the code below to solve the problem
import java.util.Scanner;

class Codechef
{
	public static void main (String[] args)
	{
	    Scanner read = new Scanner(System.in);
		
		int t = read.nextInt();
		System.out.println(10);
		System.out.println(30);
		//Update your code below this line to solve the problem
		for(int i=0;i<t;++i)
		{
		    int x = read.nextInt();
		    int y=t*2*5;
		    System.out.println(y);
		    
		}
	}
}

Learning course: Placement preparation using Java
Problem Link: CodeChef: Practical coding for everyone

Hi @p_20ai135
In your code, you have to remove System.out.println(10);System.out.println(30); these lines because it prints and not taken as user input manual. Here is the correct code below.
//correct code
import java.util.Scanner;
class Codechef
{
public static void main (String args)
{
Scanner read = new Scanner(System.in);
int t = read.nextInt();
for(int i=0;i<t;i++){
int x=read.nextInt();
System.out.println(x25);
}

}

}
This code gives you correct output.

Thank you :smile: