2
I am training for OBI and am picking up the exercises on your website and sending to run on it too, but my code is giving error:
Error: Could not find or load main class solved
"Error: Unable to locate or load the main class fixed" and in my terminal too, why will it be?
package treinamento;
import java.util.Scanner;
/**
*
* @author mrminerin
*/
public class solucao {
public static void main (String[]args) {
Scanner sc = new Scanner(System.in);
int n = Integer.parseInt(sc.nextLine());
String [] pedacos = sc.nextLine().split(" ");
int [] pedacos2 = new int[pedacos.length];
int pedaco = 0;
for (int i = 0; i < pedacos.length; i++) {
pedacos2[i] = Integer.parseInt(pedacos[i]);
pedaco += pedacos2[i];
}
System.out.println(pedaco - n);
}
}
Yes, I know it must be capitalized, but they ask in this way.
– Mr Minerin
@Mrminerin in this case is "custom", the only obligation is to have the same file name
– Denis Rudnei de Souza
@Mrminerin if the answer helped you, can mark it as accepted
– Denis Rudnei de Souza