There are a few things to fix in your code.
First, your first two import statements don’t have the *.
Second, you don’t need to test for whether or not T is between 0 and 100. All that the problem means is that they will not give any inputs out of those restraints.
Third, you can get rid of num15, as it isn’t used, as well as the array. You only need each input once so there’s no need to store them in an array.
Fourth is that in this part of your code:
You’re doing num5=num5-10 for some reason. I think you meant num5-=2, or num5 = num5-2.
That should help you. You’re code’s also only printing out two answers, but I think that’s a problem with my IDE.
Also, just a side note, for faster I/O, use BufferedReader br = new BufferedReader(new InputStreamReader(System.in));, and StringTokenizer st = new StringTokenizer(br.readLine()); instead of the Scanner.
Why my code is showing NZEC error that too for line 1??? I’m new to codechef please help me out…what I’m suppose to do???why is this happening even though my code gives proper outputs??? CodeChef: Practical coding for everyone
Your AC code CodeChef: Practical coding for everyone
There were 2 problems. First you need to see if 10 rupee coin is available then you have to give it. Second there was input of array in single line. You can not use int(input())