Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
  	Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int M = sc.nextInt();
    int K = sc.nextInt();
    int A = new int[N];
    int B = new int[M];
    int book = 2;
    for(int i=0;i<N;i++)
      A[i] = sc.nextInt();
    for(int i=0;i<M;i++)
      B[i] = sc.nextInt();
    int j = 0;
      while(A[i] + B[i] < K){
       	A[i] = A[i]+A[i++];
        if(A[i] + B[i] < K)
          book++;
        B[i] = B[i]+B[i++];
        book++;
      }
    System.out.println(book);
  }
}

Compiler output:
Main.java:8: error: incompatible types: int[] cannot be converted to int
    int A = new int[N];
            ^
Main.java:9: error: incompatible types: int[] cannot be converted to int
    int B = new int[M];
            ^
Main.java:12: error: array required, but int found
      A[i] = sc.nextInt();
       ^
Main.java:14: error: array required, but int found
      B[i] = sc.nextInt();
       ^
Main.java:16: error: cannot find symbol
      while(A[i] + B[i] < K){
              ^
  symbol:   variable i
  location: class Main
Main.java:16: error: array required, but int found
      while(A[i] + B[i] < K){
             ^
Main.java:16: error: cannot find symbol
      while(A[i] + B[i] < K){
                     ^
  symbol:   variable i
  location: class Main
Main.java:16: error: array required, but int found
      while(A[i] + B[i] < K){
                    ^
Main.java:17: error: cannot find symbol
       	A[i] = A[i]+A[i++];
       	  ^
  symbol:   variable i
  location: class Main
Main.java:17: error: array required, but int found
       	A[i] = A[i]+A[i++];
       	 ^
Main.java:17: error: cannot find symbol
       	A[i] = A[i]+A[i++];
       	         ^
  symbol:   variable i
  location: class Main
Main.java:17: error: array required, but int found
       	A[i] = A[i]+A[i++];
       	        ^
Main.java:17: error: cannot find symbol
       	A[i] = A[i]+A[i++];
       	              ^
  symbol:   variable i
  location: class Main
Main.java:17: error: array required, but int found
       	A[i] = A[i]+A[i++];
       	             ^
Main.java:18: error: cannot find symbol
        if(A[i] + B[i] < K)
             ^
  symbol:   variable i
  location: class Main
Main.java:18: error: array required, but int found
        if(A[i] + B[i] < K)
            ^
Main.java:18: error: cannot find symbol
        if(A[i] + B[i] < K)
                    ^
  symbol:   variable i
  location: class Main
Main.java:18: error: array required, but int found
        if(A[i] + B[i] < K)
                   ^
Main.java:20: error: cannot find symbol
        B[i] = B[i]+B[i++];
          ^
  symbol:   variable i
  location: class Main
Main.java:20: error: array required, but int found
        B[i] = B[i]+B[i++];
         ^
Main.java:20: error: cannot find symbol
        B[i] = B[i]+B[i++];
                 ^
  symbol:   variable i
  location: class Main
Main.java:20: error: array required, but int found
        B[i] = B[i]+B[i++];
                ^
Main.java:20: error: cannot find symbol
        B[i] = B[i]+B[i++];
                      ^
  symbol:   variable i
  location: class Main
Main.java:20: error: array required, but int found
        B[i] = B[i]+B[i++];
                     ^
24 errors