My issue
why i am getting runtime exception having NoSuchElementException
My code
import java.util.*;
import java.lang.*;
import java.io.*;
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
// your code goes here
Scanner obj = new Scanner(System.in);
int t = obj.nextInt();
for(int i = 0; i<=t; i++){
int ten = obj.nextInt();
int five = obj.nextInt();
int z = obj.nextInt();
int sum = (ten*10)+(five*5);
sum = sum/z;
System.out.println(Math.floor(sum));
}
}
}
Learning course: Basic Math using Java
Problem Link: Chef and Chocolates Practice Problem in - CodeChef