Help me in solving FLOW001 problem

My issue

Exception in thread “main” java.util.NoSuchElementException
at java.base/java.util.Scanner.throwFor(
at java.base/
at java.base/java.util.Scanner.nextInt(
at java.base/java.util.Scanner.nextInt(
at Codechef.main( what is this??

My code

/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;

/* Name of the class has to be "Main" only if the class is public. */
class Codechef
	public static void main (String[] args) throws java.lang.Exception
		// your code goes here
			Scanner scn = new Scanner(;
		int t = scn.nextInt();
		while(t > 0){
		    int a = scn.nextInt();
		    int b = scn.nextInt();
		    int c = a + b;

Learning course: Practice Java
Problem Link: CodeChef: Practical coding for everyone

you have forgotten to decrement the while there should be a t–;