I
(I'll flag in the code below:
Error:
error: can not find symbol R + = I [P0]; ^ symbol: variable I location: class math 1 error
class Matematica {
public static void main (String args[]) {
Scanner ler = new Scanner(System.in);
int T = ler.nextInt();
for(int SN=0 ; SN < T ; SN++){
int N = ler.nextInt();
int I[]=new int [N];
I[SN]=ler.nextInt();
}
int Q = ler.nextInt();
for(int SQ=0 ; SQ < Q ; SQ++) {
int P [] = new int[2];
P[0] = ler.nextInt();
P[1] = ler.nextInt();
while(P[0] <= P[1]) {
int P0=P[0];
int R = 0;
R+= I[P0]; // O erro está nessa linha
if(P[0] == P[1])
System.out.printf("%d",R);
P[0]++;
}
}
}