I'm training for OBI and I'm getting 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 solution
" Error: Could not find or load the main class solution " and in my terminal too, why?
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);
}
}