# Help me in solving BMJ206 problem

### My issue

import java.util.Scanner;

class Codechef
{
public static void main (String[] args)
{
Scanner read = new Scanner(System.in);

``````	int t = read.nextInt();
//Update your code below this line to solve the problem
int x = read.nextInt();
System.out.println(2*5*x);

}
``````

}

### 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();
//Update your code below this line to solve the problem
int x = read.nextInt();
System.out.println(2*5*x);

}
}
``````

Learning course: Java for problem solving - 1
Problem Link: CodeChef: Practical coding for everyone

@satyamguptajsr
U have to do it like this.

``````// Solution as follows
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();

// Create a new variable Y for total distance.
// 5 days a week - Chef will travel 2*X daily - i.e. return trip walk to office
int y = 2 * x * 5;

// Print the distance travelled for each test case.
System.out.println(y);
}
}
}
``````