criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
#include<stdio.h>
using namespace std;

int main(){
    while(1){
        int n,x;
        cin >> n >> x;
        if(n == 0 && x == 0){
            break;
        }else{
            int count = 0;
            int i,j,k;
            for(i =1;i<n;i++){
                for(j =1;j<n;j++){
                    for(k=1;k<n;k++){
                        if ( i<j && j < k && i+j+k=x ){
                            count+=1;
                        }
                    }
                }
            }
            cout << count << endl;
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:43: error: lvalue required as left operand of assignment
   34 |                         if ( i<j && j < k && i+j+k=x ){
      |                              ~~~~~~~~~~~~~^~~~~~~~
Language: C++

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
#include<stdio.h>
using namespace std;

int main(){
    while(1){
        int n,x;
        cin >> n >> x;
        if(n == 0 && x == 0){
            break;
        }else{
            int count = 0;
            int i,j,k;
            for(i =1;i<n;i++){
                for(j =1;j<n;j++){
                    for(k=1;k<n;k++){
                        if ( i<j && j < k && i+j+k=x ){
                            count+=1;
                        }else{
                            continue;
                        }
                    }
                }
            }
            cout << count << endl;
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:43: error: lvalue required as left operand of assignment
   34 |                         if ( i<j && j < k && i+j+k=x ){
      |                              ~~~~~~~~~~~~~^~~~~~~~
Language: C++

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
#include<stdio.h>
using namespace std;

int main(){
    while(1){
        int n,x;
        cin >> n >> x;
        if(n == 0 && x == 0){
            break;
        }else{
            int count = 0;
            int i,j,k;
            for(i =1;i<n;i++){
                for(j =1;j<n;j++){
                    for(k=1;k<n;k++){
                        if ( i < j && j < k && i+j+k=+x ){
                            count+=1;
                        }else{
                            continue;
                        }
                    }
                }
            }
            cout << count << endl;
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:45: error: lvalue required as left operand of assignment
   34 |                         if ( i < j && j < k && i+j+k=+x ){
      |                              ~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

int main(int argc, const char * argv[]) {
    
    while (1) {
        
        long long int n, x ;
        
        std::cin >> n >> x ;
        if (n==0&&x==0) break ;
        
        int count = 0 ;
        
        for (long long int i=n; i>0; i--) {
            for (long long int j=i-1; j>0; j--) {
                for (long long int k=j-1; k>0; k--) {
                    count += ( i + j + k == x) ;
                }
            }
        }
        
        printf("%d\n", count) ;
        
    }
    
    return 0 ;
}



Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:7:14: error: 'cin' is not a member of 'std'
    7 |         std::cin >> n >> x ;
      |              ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main(int argc, const char * argv[]) {
a.cc:20:9: error: 'printf' was not declared in this scope
   20 |         printf("%d\n", count) ;
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(int argc, const char * argv[]) {
Language: C++

#include <iostream>
using namespace std;

int main (){
    int n, x, sum, cont;
    count = 0;
    
    while(1){
        cin >> n >> x;
        if((n == 0) && (x == 0)) break;
        for(int i = 3;i < (n-2);i++){
            for(int j = i j <= n;j++){
                sum = i-2 + i-1 + j;
                if(sum == x) count++;
            }
        }
        cout << count << endl;
    }
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'count' was not declared in this scope; did you mean 'cont'?
    6 |     count = 0;
      |     ^~~~~
      |     cont
a.cc:12:26: error: expected ';' before 'j'
   12 |             for(int j = i j <= n;j++){
      |                          ^~
      |                          ;
Language: C++

#include <iostream>
using namespace std;

int main (){
    int n, x, sum, cont;
    count = 0;
    
    while(1){
        cin >> n >> x;
        if((n == 0) && (x == 0)) break;
        for(int i = 3;i < (n-2);i++){
            for(int j = i ; j <= n;j++){
                sum = i-2 + i-1 + j;
                if(sum == x) count++;
            }
        }
        cout << count << endl;
    }
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'count' was not declared in this scope; did you mean 'cont'?
    6 |     count = 0;
      |     ^~~~~
      |     cont
Language: C++

#include <iostream>
using namespace std;
int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    int n,x;
    while (cin>>n>>x, n||x) {
        int count = 0;
        for (int i=1; i<=n; ++i) {
            for javascript:void(0)(int j=i+1; j<=n; ++j) {
                for (int k=j+1; k<=n; ++k) {
                    if (i+j+k == x) {
                        count ++;
                    }
                }
            }
        }
        cout << count << "\n";
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: expected '(' before 'javascript'
   11 |             for javascript:void(0)(int j=i+1; j<=n; ++j) {
      |                 ^~~~~~~~~~
      |                 (
a.cc:11:17: error: 'javascript' was not declared in this scope
   11 |             for javascript:void(0)(int j=i+1; j<=n; ++j) {
      |                 ^~~~~~~~~~
a.cc:11:47: error: 'j' was not declared in this scope
   11 |             for javascript:void(0)(int j=i+1; j<=n; ++j) {
      |                                               ^
Language: C++

int main(){
	int n, x;
	int count = 0;
	while (1){
		cin >> n >> x;
		if (n == 0 && x == 0) break;
		int i, j, k;
		for (i = 1; i <= n; ++i){
			for (j = i + 1; j <= n; ++j){
				for (k = j + 1; k <= n; ++k){
					if (i + j + k == x) count++;
				}
			}
		}
		cout << count << endl;
		count = 0;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:17: error: 'cin' was not declared in this scope
    5 |                 cin >> n >> x;
      |                 ^~~
a.cc:15:17: error: 'cout' was not declared in this scope; did you mean 'count'?
   15 |                 cout << count << endl;
      |                 ^~~~
      |                 count
a.cc:15:34: error: 'endl' was not declared in this scope
   15 |                 cout << count << endl;
      |                                  ^~~~
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;

int n,x,count;
int main() {
	while(true) {
		cin >> n >> x;
		if(n == 0 && x == 0) break;
		int m = min{n,x-3};
		for(int i = m; i > x/3; --i) {
			int sum = x-i;
			int num = i - sum/2 -1;
			count += num;
		}
		cout << count << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:25: error: cannot resolve overloaded function 'min' based on conversion to type 'int'
   10 |                 int m = min{n,x-3};
      |                         ^~~
a.cc:14:25: error: reference to 'count' is ambiguous
   14 |                         count += num;
      |                         ^~~~~
In file included from /usr/include/c++/14/algorithm:86,
                 from a.cc:2:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: candidates are: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
  101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:4025:5: note:                 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
 4025 |     count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
      |     ^~~~~
a.cc:5:9: note:                 'int count'
    5 | int n,x,count;
      |         ^~~~~
a.cc:16:25: error: reference to 'count' is ambiguous
   16 |                 cout << count << endl;
      |                         ^~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: candidates are: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
  101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~
/usr/include/c++/14/bits/stl_algo.h:4025:5: note:                 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
 4025 |     count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
      |     ^~~~~
a.cc:5:9: note:                 'int count'
    5 | int n,x,count;
      |         ^~~~~
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;

int n,x,count;
int main() {
	while(true) {
		cin >> n >> x;
		if(n == 0 && x == 0) break;
		int m;
		m = min{n,x-3};
		for(int i = m; i > x/3; --i) {
			int sum = x-i;
			int num = i - sum/2 -1;
			count += num;
		}
		cout << count << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: cannot resolve overloaded function 'min' based on conversion to type 'int'
   11 |                 m = min{n,x-3};
      |                     ^~~
a.cc:15:25: error: reference to 'count' is ambiguous
   15 |                         count += num;
      |                         ^~~~~
In file included from /usr/include/c++/14/algorithm:86,
                 from a.cc:2:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: candidates are: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
  101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:4025:5: note:                 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
 4025 |     count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
      |     ^~~~~
a.cc:5:9: note:                 'int count'
    5 | int n,x,count;
      |         ^~~~~
a.cc:17:25: error: reference to 'count' is ambiguous
   17 |                 cout << count << endl;
      |                         ^~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: candidates are: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
  101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~
/usr/include/c++/14/bits/stl_algo.h:4025:5: note:                 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
 4025 |     count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
      |     ^~~~~
a.cc:5:9: note:                 'int count'
    5 | int n,x,count;
      |         ^~~~~
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;

int n,x,count;
int main() {
	while(true) {
		cin >> n >> x;
		if(n == 0 && x == 0) break;
		int m;
		m = min(n,x-3);
		for(int i = m; i > x/3; --i) {
			int sum = x-i;
			int num = i - sum/2 -1;
			count += num;
		}
		cout << count << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:25: error: reference to 'count' is ambiguous
   15 |                         count += num;
      |                         ^~~~~
In file included from /usr/include/c++/14/algorithm:86,
                 from a.cc:2:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: candidates are: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
  101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:4025:5: note:                 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
 4025 |     count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
      |     ^~~~~
a.cc:5:9: note:                 'int count'
    5 | int n,x,count;
      |         ^~~~~
a.cc:17:25: error: reference to 'count' is ambiguous
   17 |                 cout << count << endl;
      |                         ^~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: candidates are: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
  101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~
/usr/include/c++/14/bits/stl_algo.h:4025:5: note:                 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
 4025 |     count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
      |     ^~~~~
a.cc:5:9: note:                 'int count'
    5 | int n,x,count;
      |         ^~~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
	int n,x;
	while'(1){
	int r=0;
	cin >> n >> x;
	if(n==0 && x==0)return 0;
	
	for(int i=1;i<=n; i++){
	for(int j=i+1;j<=j;j++){
	for(int k=j+1;k<=k;k++){
	if(i+j+k==x){
	r +=1;
	break;
	}
}
}
}
cout << r << "\n";
	}
} 

Compiler output:
a.cc:6:14: warning: missing terminating ' character
    6 |         while'(1){
      |              ^
a.cc:6:14: error: missing terminating ' character
    6 |         while'(1){
      |              ^~~~~
a.cc: In function 'int main()':
a.cc:7:9: error: expected '(' before 'int'
    7 |         int r=0;
      |         ^~~
      |         (
a.cc:7:16: error: expected ')' before ';' token
    7 |         int r=0;
      |         ~~~    ^
      |                )
a.cc:15:9: error: 'r' was not declared in this scope
   15 |         r +=1;
      |         ^
a.cc:21:9: error: 'r' was not declared in this scope
   21 | cout << r << "\n";
      |         ^
a.cc: At global scope:
a.cc:23:1: error: expected declaration before '}' token
   23 | }
      | ^
Language: Java

import java.util.Scanner;

public class Main {
            Scanner input = new Scanner(System.in);

        // Grab the row and col data
        int rows = input.nextInt();
        int cols = input.nextInt();

        // build the matrix and add 1 to the cols and rows for the result matrix
        int[][] result = new int[rows +1][cols+1];

        // Create the storage contains for the running total
        int[] colTot = new int[cols]; // only column totals are needed since row totals can be done while read in
        int total = 0;

        // Compute totals in line
        for(int row = 0; row < rows+1; row++) {
            int rowTemp = 0;
            for(int col = 0; col < cols+1; col++){
                // nested if-else structure that handles the three border cases:
                // 1 - on the end of the row
                // 2 - at the bottom of a column
                // 3 - at the bottom right hand corner of the matrix
                // These cases need special handling otherwise grab the next entry from the input and calculate the
                // appropriate values
                if(col == cols && row == rows){
                   result[row][col] = total;
                } else if(col == cols){
                   result[row][col] = rowTemp;
                } else if(row == rows) {
                   result[row][col] = colTot[col];
                } else {
                   // Compute the rest of the values
                   int temp = input.nextInt();
                   total += temp;
                   rowTemp += temp;
                   colTot[col] += temp;
                   result[row][col] = temp;
                }
            }
        }
        // display output
        showSheet(result);

    }

    private static void showSheet(int[][] result){
        for(int i = 0; i < result.length; i++){
            System.out.print("\n");
            for(int j = 0; j < result[0].length; j++){
                System.out.print(result[i][j]);
                if( j < result[0].length - 1) System.out.print(" ");
            }
        }
    }
}


Compiler output:
Main.java:18: error: illegal start of type
        for(int row = 0; row < rows+1; row++) {
        ^
Main.java:18: error: > or ',' expected
        for(int row = 0; row < rows+1; row++) {
                                   ^
Main.java:18: error: <identifier> expected
        for(int row = 0; row < rows+1; row++) {
                                          ^
Main.java:44: error: invalid method declaration; return type required
        showSheet(result);
        ^
Main.java:44: error: <identifier> expected
        showSheet(result);
                        ^
Main.java:48: error: unnamed classes are a preview feature and are disabled by default.
    private static void showSheet(int[][] result){
                   ^
  (use --enable-preview to enable unnamed classes)
Main.java:57: error: class, interface, enum, or record expected
}
^
7 errors
Language: Java

import java.util.Scanner;

public class Main {
            Scanner input = new Scanner(System.in);

        // Grab the row and col data
        int rows = input.nextInt();
        int cols = input.nextInt();

        // build the matrix and add 1 to the cols and rows for the result matrix
        int[][] result = new int[rows +1][cols+1];

        // Create the storage contains for the running total
        int[] colTot = new int[cols]; // only column totals are needed since row totals can be done while read in
        int total = 0;

        // Compute totals in line
        for(int row = 0; row < rows+1; row++) {
            int rowTemp = 0;
            for(int col = 0; col < cols+1; col++){
                // nested if-else structure that handles the three border cases:
                // 1 - on the end of the row
                // 2 - at the bottom of a column
                // 3 - at the bottom right hand corner of the matrix
                // These cases need special handling otherwise grab the next entry from the input and calculate the
                // appropriate values
                if(col == cols && row == rows){
                   result[row][col] = total;
                } else if(col == cols){
                   result[row][col] = rowTemp;
                } else if(row == rows) {
                   result[row][col] = colTot[col];
                } else {
                   // Compute the rest of the values
                   int temp = input.nextInt();
                   total += temp;
                   rowTemp += temp;
                   colTot[col] += temp;
                   result[row][col] = temp;
                }
            }
        }
        // display output
        showSheet(result);

    }

    private static void showSheet(int[][] result){
        for(int i = 0; i < result.length; i++){
            System.out.print("\n");
            for(int j = 0; j < result[0].length; j++){
                System.out.print(result[i][j]);
                if( j < result[0].length - 1){ System.out.print(" ");}
            }
        }
    }
}


Compiler output:
Main.java:18: error: illegal start of type
        for(int row = 0; row < rows+1; row++) {
        ^
Main.java:18: error: > or ',' expected
        for(int row = 0; row < rows+1; row++) {
                                   ^
Main.java:18: error: <identifier> expected
        for(int row = 0; row < rows+1; row++) {
                                          ^
Main.java:44: error: invalid method declaration; return type required
        showSheet(result);
        ^
Main.java:44: error: <identifier> expected
        showSheet(result);
                        ^
Main.java:48: error: unnamed classes are a preview feature and are disabled by default.
    private static void showSheet(int[][] result){
                   ^
  (use --enable-preview to enable unnamed classes)
Main.java:57: error: class, interface, enum, or record expected
}
^
7 errors
Language: Java

import com.sun.javafx.image.IntPixelGetter;

import java.util.ArrayList;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner inp = new Scanner(System.in);

        ArrayList<Integer> input = new ArrayList<>();

        int rows = inp.nextInt();
        int columns = inp.nextInt();

        ArrayList<ArrayList<Integer>> numbers = new ArrayList<>();

        System.out.println("");

        for (int i = 0; i < rows; i++){
            ArrayList<Integer> numberRow = new ArrayList<>();
            for (int j = 0; j < columns; j++) {
                numberRow.add(inp.nextInt());
            }
            numbers.add(numberRow);
        }

        output(numbers, rows, columns);
    }

    public static void output (ArrayList<ArrayList<Integer>> numbers, int rows, int columns) {
        int totalTotal = 0;

        ArrayList<Integer> totalCol = new ArrayList<>();

        for (int i = 0; i < columns; i++) {
            totalCol.add(0);
        }

        for (int i = 0; i < rows; i++){
            int total = 0;
            for (int j = 0; j < columns; j++) {
                if (j != 0) {
                    System.out.print(" ");
                }

                int n = numbers.get(i).get(j);
                System.out.print(n);

                total += n;

                int colTol = totalCol.get(j);
                totalCol.remove(j);
                totalCol.add(j, colTol+n);
            }

            System.out.print(" " + total);

            totalTotal += total;
            total = 0;

            System.out.print("\n");
        }

        for (int i : totalCol) {
            System.out.print(i + " ");
        }

        System.out.println(totalTotal);
    }
}



Compiler output:
Main.java:1: error: package com.sun.javafx.image does not exist
import com.sun.javafx.image.IntPixelGetter;
                           ^
1 error
Language: Java

import java.util.ArrayList;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner inp = new Scanner(System.in);

        ArrayList<Integer> input = new ArrayList<>();

        int rows = inp.nextInt();
        int columns = inp.nextInt();

        ArrayList<ArrayList<Integer>> numbers = new ArrayList<>();

        for (int i = 0; i < rows; i++){
            ArrayList<Integer> numberRow = new ArrayList<>();
            for (int j = 0; j < columns; j++) {
                numberRow.add(inp.nextInt());
            }
            numbers.add(numberRow);
        }

        output(numbers, rows, columns);
    }

    public static void output (ArrayList<ArrayList<Integer>> numbers, int rows, int columns) {
        int totalTotal = 0;

        ArrayList<Integer> totalCol = new ArrayList<>();

        for (int i = 0; i < columns; i++) {
            totalCol.add(0);
        }

        for (int i = 0; i < rows; i++){
            int total = 0;
            for (int j = 0; j < columns; j++) {
                if (j != 0) {
                    System.out.print(" ");
                }

                int n = numbers.get(i).get(j);
                System.out.print(n);

                total += n;

                int colTol = totalCol.get(j);
                totalCol.remove(j);
                totalCol.add(j, colTol+n);
            }

            System.out.print(" " + total);

            totalTotal += total;
            total = 0;

            System.out.print("\n");
        }

        for (int i : totalCol) {
            System.out.print(i + " ");
        }

        System.out.print(totalTotal + "\n);
    }
}



Compiler output:
Main.java:64: error: unclosed string literal
        System.out.print(totalTotal + "\n);
                                      ^
1 error
Language: Java

import java.util.Scanner;
class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int r=sc.nextInt();
        int c=sc.nextInt();
        int[][] rc=new[r+1][c+1];     
        for(int i=0;i<r;i++){
            for(int j=0;j<c;j++){
                rc[i][j]=sc.nextInt();
            }
        }
        int sum;
        for(int k=0;k<r;k++){
            sum=0;
            for(int l=0;l<c;l++){
                sum=sum+rc[k][l];
                if(l==c-1){
                    rc[k][c]=sum;
                }
            }
        }for(int a=0;a<r;a++){
            sum=0;
            for(int b=0;b<c;b++){
                sum=sum+rc[b][a];
                if(l==c-1){
                    rc[r][a]=sum;
                }
            }
        }
        for(int d=0;d<=r;d++){
            for(int e=0;e<=c;e++){
                System.out.print(rc[d][e]+"");
            }
            System.out.println();
        }
    }
}


Compiler output:
Main.java:7: error: <identifier> expected
        int[][] rc=new[r+1][c+1];     
                      ^
1 error
Language: Java

import java.util.Scanner;
class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int r=sc.nextInt();
        int c=sc.nextInt();
        int[][] rc=new[r+1][];     
        for(int i=0;i<r;i++){
            for(int j=0;j<c;j++){
                rc[i][j]=sc.nextInt();
            }
        }
        int sum;
        for(int k=0;k<r;k++){
            sum=0;
            for(int l=0;l<c;l++){
                sum=sum+rc[k][l];
                if(l==c-1){
                    rc[k][c]=sum;
                }
            }
        }for(int a=0;a<r;a++){
            sum=0;
            for(int b=0;b<c;b++){
                sum=sum+rc[b][a];
                if(l==c-1){
                    rc[r][a]=sum;
                }
            }
        }
        for(int d=0;d<=r;d++){
            for(int e=0;e<=c;e++){
                System.out.print(rc[d][e]+"");
            }
            System.out.println();
        }
    }
}


Compiler output:
Main.java:7: error: <identifier> expected
        int[][] rc=new[r+1][];     
                      ^
1 error
Language: Java

import java.util.Scanner;
class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int r=sc.nextInt();
        int c=sc.nextInt();
        int[][] rc=new[][];     
        for(int i=0;i<r;i++){
            for(int j=0;j<c;j++){
                rc[i][j]=sc.nextInt();
            }
        }
        int sum;
        for(int k=0;k<r;k++){
            sum=0;
            for(int l=0;l<c;l++){
                sum=sum+rc[k][l];
                if(l==c-1){
                    rc[k][c]=sum;
                }
            }
        }for(int a=0;a<r;a++){
            sum=0;
            for(int b=0;b<c;b++){
                sum=sum+rc[b][a];
                if(l==c-1){
                    rc[r][a]=sum;
                }
            }
        }
        for(int d=0;d<=r;d++){
            for(int e=0;e<=c;e++){
                System.out.print(rc[d][e]+"");
            }
            System.out.println();
        }
    }
}


Compiler output:
Main.java:7: error: <identifier> expected
        int[][] rc=new[][];     
                      ^
Main.java:7: error: array dimension missing
        int[][] rc=new[][];     
                          ^
2 errors
Language: Java

import java.util.Scanner;
class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int r=sc.nextInt();
        int c=sc.nextInt();
        int[][] rc=new[r][c];     
        for(int i=0;i<r;i++){
            for(int j=0;j<c;j++){
                rc[i][j]=sc.nextInt();
            }
        }
        int sum;
        for(int k=0;k<r;k++){
            sum=0;
            for(int l=0;l<c;l++){
                sum=sum+rc[k][l];
                if(l==c-1){
                    rc[k][c]=sum;
                }
            }
        }for(int a=0;a<r;a++){
            sum=0;
            for(int b=0;b<c;b++){
                sum=sum+rc[b][a];
                if(l==c-1){
                    rc[r][a]=sum;
                }
            }
        }
        for(int d=0;d<=r;d++){
            for(int e=0;e<=c;e++){
                System.out.print(rc[d][e]+"");
            }
            System.out.println();
        }
    }
}


Compiler output:
Main.java:7: error: <identifier> expected
        int[][] rc=new[r][c];     
                      ^
1 error
Language: Java

import java.util.Scanner;
class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int r=sc.nextInt();
        int c=sc.nextInt();
        int[][] rc=new[5][4];     
        for(int i=0;i<r;i++){
            for(int j=0;j<c;j++){
                rc[i][j]=sc.nextInt();
            }
        }
        int sum;
        for(int k=0;k<r;k++){
            sum=0;
            for(int l=0;l<c;l++){
                sum=sum+rc[k][l];
                if(l==c-1){
                    rc[k][c]=sum;
                }
            }
        }for(int a=0;a<r;a++){
            sum=0;
            for(int b=0;b<c;b++){
                sum=sum+rc[b][a];
                if(l==c-1){
                    rc[r][a]=sum;
                }
            }
        }
        for(int d=0;d<=r;d++){
            for(int e=0;e<=c;e++){
                System.out.print(rc[d][e]+"");
            }
            System.out.println();
        }
    }
}


Compiler output:
Main.java:7: error: <identifier> expected
        int[][] rc=new[5][4];     
                      ^
1 error
Language: Java

import java.util.Scanner;
class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int r=sc.nextInt();
        int c=sc.nextInt();
        int[][] rc=new int[r+1][c+1];     
        for(int i=0;i<r;i++){
            for(int j=0;j<c;j++){
                rc[i][j]=sc.nextInt();
            }
        }
        int sum;
        for(int k=0;k<r;k++){
            sum=0;
            for(int l=0;l<c;l++){
                sum=sum+rc[k][l];
                if(l==c-1){
                    rc[k][c]=sum;
                }
            }
        }for(int a=0;a<r;a++){
            sum=0;
            for(int b=0;b<c;b++){
                sum=sum+rc[b][a];
                if(l==c-1){
                    rc[r][a]=sum;
                }
            }
        }
        for(int d=0;d<=r;d++){
            for(int e=0;e<=c;e++){
                System.out.print(rc[d][e]+"");
            }
            System.out.println();
        }
    }
}


Compiler output:
Main.java:26: error: cannot find symbol
                if(l==c-1){
                   ^
  symbol:   variable l
  location: class Main
1 error
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * Lesson7C 表の行数rと列数c、r × c の要素を持つ表を読み込んで、
 * 各行と列の合計を挿入した新しい表を出力するプログラム
 *
 * @author Internship
 *
 */
public class Lesson7C {

	/**
	 * プログラムのエントリポイント
	 *
	 * @param args
	 */
	public static void main(String[] args) {


		//行や列の各数字の一時保管場所
		int intVector = 0;

		//入力値の各行の文字列の一時保管場所
		String strLineAll = "";

		//行の合計値
		int intColumnSum = 0;

		//行と列の全合計値
		int intSum = 0;

		//一行目を読み込む
		try {
			BufferedReader insBR = new BufferedReader(new InputStreamReader(System.in));

			String strLine1 = insBR.readLine();

			//ばらけさせる
			String[] strAryLine1 = strLine1.split(" ");

			//行の数
			int intLine = Integer.parseInt(strAryLine1[0]);

			//列の数
			int intColumn = Integer.parseInt(strAryLine1[1]);

			//行と列が決まったところで配列の大きさが決まる
			int[][] intTable = new int[intLine + 1][intColumn + 1];

			//二行目以降を読み込む
			//i行目
			for(int i = 0; i < intLine; i++) {
				strLineAll = insBR.readLine();

			//ばらけさせる
				String[] strAryLine = strLineAll.split(" ");

				//int型にキャスト
				//j列目
				for(int j = 0; j < intColumn; j++) {
					intVector = Integer.parseInt(strAryLine[j]);

					//配列に格納
					//i行のj列
					intTable[i][j] = intVector;

					//行の合計値をカウント
					intColumnSum += intVector;

					//列の合計値をカウント
					intTable[intLine][j] += intVector;

					//総合計値をカウント
					intSum += intVector;
				}
				//行の合計値を代入
				intTable[i][intColumn] = intColumnSum;

				//1行分終わったのでリセット
				intColumnSum = 0;
			}

			//総合計値を代入
			intTable[intLine][intColumn] = intSum;

			//計算して出力
			for(int i = 0; i <= intLine; i++) {
				for(int j = 0; j <= intColumn; j++) {

					if(j == 0) {
						System.out.print(intTable[i][j]);
					}else {
						System.out.print(" " + intTable[i][j]);
					}
				}
				System.out.println("");
			}

		} catch (IOException e) {
			System.out.println(e);
		} catch (NumberFormatException e) {
			System.out.println("数字で入力して下さい");
		}
	}
}

Compiler output:
Main.java:12: error: class Lesson7C is public, should be declared in a file named Lesson7C.java
public class Lesson7C {
       ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main{
	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		int r, c, sum, sumOfAll;
		int[][] sheet;
		String[] size = in.readLine().split(" ");
		r = Integer.parseInt(size[0]);
		c = Integer.parseInt(size[1]);
		StringBuilder sb = new StringBuilder((r + 1) * (c + 1));
		sheet = new int[r][c];
		for (int i = 0; i < r; i += 1) {
			sum = 0;
			String[] array = in.readLine().split(" ");
			for (int j = 0; j < c; j += 1) {
				sheet[i][j] = Integer.parseInt(array[j]);
				sb.append(sheet[i][j]).append(" ");
				sum += sheet[i][j];
			}
			sb.append(sum + System.getProperty("line.separator"));
		}
		in = null;
		sumOfAll = 0;
		for (int m = 0; m < c; m += 1) {
			sum = 0;
			for (int n = 0; n < r; n += 1) {
				sum += sheet[n][m];
			}
			sumOfAll += sum;
			sb.append(sum).append(" ");
		}
		sb.append(sumOfAll);
		System.out.println(sb);
　　　　　　　　sb = null;
	}
}

Compiler output:
Main.java:37: error: illegal character: '\u3000'
????????sb = null;
^
Main.java:37: error: illegal character: '\u3000'
????????sb = null;
 ^
Main.java:37: error: illegal character: '\u3000'
????????sb = null;
  ^
Main.java:37: error: illegal character: '\u3000'
????????sb = null;
   ^
Main.java:37: error: illegal character: '\u3000'
????????sb = null;
    ^
Main.java:37: error: illegal character: '\u3000'
????????sb = null;
     ^
Main.java:37: error: illegal character: '\u3000'
????????sb = null;
      ^
Main.java:37: error: illegal character: '\u3000'
????????sb = null;
       ^
8 errors
Language: Java

import java.util.*;
import java.text.*;

class Main {
    public static void main(String[]args)throws Exception {
        Scanner sc = new Scanner(System.in);
        int r = sc.nextInt();
        int c = sc.nextInt();
        int [][] a = new int[r][c];
        int [] sr = new int[c];
        int [] sc = new int[r];
        int s = 0;
        for(int i = 0; i < r; i++) {
            for(int j = 0; j < c; j++) {
                a[i][j] = sc.nextInt();
                sc[i] += a[i][j];
                sr[j] += a[i][j];
                s += a[i][j];
            }
        }
        for(int i = 0; i < r; i++) {
            for(int j = 0; j < c; j++) {
                System.out.print("" + a[i][j] + " ");
            }
            System.out.println(sc[i]);
        }
        for(int j = 0; j < c; j++) {
            System.out.print("" + sr[j] + " ");
        }
        System.out.println(s);
    }
}

Compiler output:
Main.java:11: error: variable sc is already defined in method main(String[])
        int [] sc = new int[r];
               ^
Main.java:15: error: cannot find symbol
                a[i][j] = sc.nextInt();
                            ^
  symbol:   method nextInt()
  location: variable sc of type int[]
2 errors
Language: Java

import java.util.Scanner;

public class Main {

	private static Scanner sc;

	public static void main(String[] args){
		sc = new Scanner(System.in);
		int r=sc.nextInt();
		int c=sc.nextInt();
		int m[][]=new int[r+1][c+1];
		for(int i=0;i<r;i++){
			for(int j=0;j<c;j++){
				m[i][j]=sc.nextInt();
			}
		}

		for(int i=0;i<r;i++){
			for(int j=0;j<c;j++){
				System.out.print(m[i][j]+" ");
				m[i][c]+=m[i][j];
			}
			System.out.println(m[i][c]);
		}
		for(int j=0;j<c+1;j++){
			for(int i=0;i<r;i++){
				m[r][j]+=m[i][j];
			}
			System.out.print(m[r][j]);
			if(j!=c)System.out.print(" ");
		}
		System.out.println();
	}

Compiler output:
Main.java:33: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java

import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner scan=new Scanner(System.in);
int[][] n=new int[101][101];
int[] tate=new int[101];
int[] yoko=new int[101];
for(int i=0;i<x;i++){
tate[i]=0;
yoko[i]=0;
}
int sum=0;
int x=scan.nextInt();
int y=scan.nextInt();
for(int i=0;i<x;i++){
for(int j=0;j<y;j++){
n[i][j]=scan.nextInt();
tate[y]+=n[i][j];
yoko[x]+=n[i][j];
sum+=n[i][j];
}
}
for(int i=0;i<x+1;i++){
for(int j=0;j<y;j++){
if(i!=x-1){
System.out.print(n[i][j]);
System.out.print(" ");
if(j==y-1)
System.out.println(yoko[i]);
}
else
System.out.print(tate[j]+" ");
}
}
System.out.println(sum);

}
}

Compiler output:
Main.java:8: error: cannot find symbol
for(int i=0;i<x;i++){
              ^
  symbol:   variable x
  location: class Main
1 error
Language: Java

import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        int r = in.nextInt();
        int c = in.nextInt();
        int gou = 0;
        int[][] a = new int [r+1][c+1];
        for(int i = 0; i<r; i++){
            int g = 0;
            int o = 0;
            for(int j = 0; j <c + 1; j++){
                if(c == j){
                    o += g;
                    System.out.print(g);
                    System.out.printnl();
                }else{
                    int h = in.nextInt();
                    System.out.print(h + " ");
                    g += h;
                    a[i][j] = h;
                }
            }
        }
        System.out.println();
            for(int j = 0; j<c ; j++){
            int g2 = 0;
            for(int i = 0; i<r; i++){
                g2 += a[i][j];
                }
                gou += g2;
            System.out.print(g2 + " ");
            }
        System.out.print(gou);

    }
}

Compiler output:
Main.java:17: error: cannot find symbol
                    System.out.printnl();
                              ^
  symbol:   method printnl()
  location: variable out of type PrintStream
1 error
Language: Java

import java.io.*;
 
class Spread1 {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line = br.readLine();
        String[] rc = line.split(" ");
        int r = Integer.parseInt(rc[0]);
        int c = Integer.parseInt(rc[1]);
        int[][] matrix = new int[r+1][c+1];	//????¨???§?????\??????
        int[] s = new int[c+1];
        for(int i=0; i<r; i++) {
            line = br.readLine();
            String[] inputs = line.split(" ");
            matrix[i][c] = 0;				//????¨?
            for(int j=0; j<c; j++) {
                matrix[i][j] = Integer.parseInt(inputs[j]);
                matrix[i][c] += matrix[i][j];
            }
        }
        for(int i=0; i <= c; i++) {	//????¨????????¨?????¨??????????
			matrix[r][i] = 0;
			for( int j = 0 ; j < r ; j++ ) {
				matrix[r][i] += matrix[j][i];
			}
        }
        for(int i = 0 ; i <= r ; i++ ) {
			for( int j = 0 ; j <= c ; j++ ) {
				System.out.print( matrix[i][j]) ;
				if ( j < c ) {
					System.out.print( " " ) ;
			}
			System.out.println("");
		}
    }
}

Compiler output:
Main.java:36: error: reached end of file while parsing
}
 ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;


public class Main{
	public static void main(String[] args){
    	int r,c;
    	int total= 0;
    	Scanner sc = new Scanner(System.in);
    	r = sc.nextInt();
        c = sc.nextInt();
        int [][] a = new int [r+1][c+1];

    	for(int i = 0; i < r; i++){
			for(int j = 0; j < c+1; j++){
				if(j != c){
					a[i][j] = sc.nextInt();
					a[r][j] += a[i][j];
	    			System.out.print(a[i][j]+" ");
	    			total += a[i][j];
				}
				else{
					a[i][j] = total;
					System.out.println(a[i][j]);
					a[r][j] += a[i][j];
				}
			}
			total = 0;
    	}
    	
    	for(int i = 0; i < c+1; i++){
    		System.out.print(a[r][i]+" ");
    	}
    }

}

Compiler output:
Main.java:10: error: cannot find symbol
    	Scanner sc = new Scanner(System.in);
    	^
  symbol:   class Scanner
  location: class Main
Main.java:10: error: cannot find symbol
    	Scanner sc = new Scanner(System.in);
    	                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.util.Scanner;


public class Main{
	public static void main(String[] args){
    	public static void main(String[] args){
    	int r,c;
    	int total= 0;
    	Scanner sc = new Scanner(System.in);
    	r = sc.nextInt();
        c = sc.nextInt();
        int [][] a = new int [r+1][c+1];
        System.out.println();

    	for(int i = 0; i < r; i++){
			for(int j = 0; j < c+1; j++){
				if(j != c){
					a[i][j] = sc.nextInt();
					a[r][j] += a[i][j];
	    			System.out.print(a[i][j]+" ");
	    			total += a[i][j];
				}
				else{
					a[i][j] = total;
					System.out.println(a[i][j]);
					a[r][j] += a[i][j];
				}
			}
			total = 0;
    	}

    	for(int i = 0; i < c+1; i++){
    		System.out.print(a[r][i]+" ");
    	}
    	System.out.println();
    }
}

Compiler output:
Main.java:6: error: illegal start of expression
    	public static void main(String[] args){
    	^
1 error
Language: Java

import java.util.Scanner;

public class ITP1_7_A {
	public static void main(String[] args){
    	int r,c;
    	int total= 0;
    	Scanner sc = new Scanner(System.in);
    	r = sc.nextInt();
        c = sc.nextInt();
        int [][] a = new int [r+1][c+1];

    	for(int i = 0; i < r; i++){
			for(int j = 0; j < c+1; j++){
				if(j != c){
					a[i][j] = sc.nextInt();
					a[r][j] += a[i][j];
	    			System.out.print(a[i][j]+" ");
	    			total += a[i][j];
				}
				else{
					a[i][j] = total;
					System.out.println(a[i][j]);
					a[r][j] += a[i][j];
				}
			}
			total = 0;
    	}
    	sc.close();

    	for(int i = 0; i < c+1; i++){
    		System.out.print(a[r][i]+" ");
    	}
    	System.out.println();
    }
}

Compiler output:
Main.java:3: error: class ITP1_7_A is public, should be declared in a file named ITP1_7_A.java
public class ITP1_7_A {
       ^
1 error
Language: Java

package package7;

import java.util.Scanner;

public class CSpreadsheet {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int r,c;
		int[][] A = new int[100][100];

		r = sc.nextInt();
		c = sc.nextInt();

		for (int i = 0; i < r; i++) {
			for (int j = 0; j < c; j++){
				A[i][j] = sc.nextInt();
			}
		}
		for (int i = 0; i < r; i++) {
			for (int j = 0; j < c; j++){
				A[i][c] += A[i][j];

			}
		}
		for (int i = 0; i < r; i++) {
			for (int j = 0; j < c; j++){
				A[r][j] += A[i][j];
			}

		}
		for (int i = 0; i < r; i++) {
			for (int j = 0; j < c; j++){
				A[r][c] += A[i][j];
			}
		}

		for (int i = 0; i <= r; i++) {
			
			for (int j = 0; j <= c; j++){
				if(j == c ){

					System.out.print(A[i][j]);
				}
				else{

					System.out.print(A[i][j]);
					System.out.print(" ");
				}

			}
			System.out.println();
		}

	}

}

Compiler output:
Main.java:5: error: class CSpreadsheet is public, should be declared in a file named CSpreadsheet.java
public class CSpreadsheet {
       ^
1 error
Language: Java

public class Main {
	public static void main(String[] args)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str = br.readLine();
		String[] s = str.split(" ");

		int x = Integer.parseInt(s[0]);
		int y = Integer.parseInt(s[1]);

		int sub = x + 1;
		int sub2 = y + 1;

		int [][] su2 = new int[sub][sub2];

		for(int i = 0; i < x; i++){
			String str2 =br.readLine();
			String [] s2 = str2.split(" ");

			for(int j = 0; j < y; j++){
				su2[i][j]= Integer.parseInt(s2[j]);
				su2[x][y] += Integer.parseInt(s2[j]);

				su2[x][j] += Integer.parseInt(s2[j]);
				su2[i][y] += Integer.parseInt(s2[j]);
			}
		}
		for(int i = 0; i < x + 1; i++){
			for(int j = 0; j < y + 1; j++){
				System.out.print(su2[i][j] + " ");
			}
			System.out.println();
		}
	}
}

Compiler output:
Main.java:2: error: cannot find symbol
	public static void main(String[] args)throws IOException{
	                                             ^
  symbol:   class IOException
  location: class Main
Main.java:3: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		^
  symbol:   class BufferedReader
  location: class Main
Main.java:3: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		                        ^
  symbol:   class BufferedReader
  location: class Main
Main.java:3: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		                                           ^
  symbol:   class InputStreamReader
  location: class Main
4 errors