Could someone please tell me what is wrong with this code? It shows wrong answer for some test cases, and is there any way to see what input failed?
thanks.
import java.util.*;
public class smartphonezco{
public static void main(String args[]) {
Scanner obj = new Scanner(System.in);
int i,n,max;
System.out.println("enter total number of customers: ");
Hey @shubh2003, the question itself states that you should use variables of type long, and not type int. In your program, you may encounter test cases with a value > Integer.MAX_VALUE. If you use long instead of int, it should work.