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

#include<bits/stdc++.h>
#include<iomanip>
#include<numeric>

using namespace std;
int main(){
    int n;
    cin>>n;
    vector<int> v(n);
    for(auto &a : v) cin>>a;
    vector<int> s;
    s.push_back(0);
    for(int i=0;i<n;++i){
        int m = (int)s.size();
        for(int j=0;j<m;++j){
            s.push_back(s[j]+v[i]);
        }
    }
    sort(s.rbegin(),s.rend());
    int ret = 0;
    for(auto a : s){
        if(a%10){ret = a;break;}
    }
    cout << ret << endl;
    return 0;
}

#include<bits/stdc++.h>
#include<iomanip>
#include<numeric>

using namespace std;
using ll = long long;
constexpr int mo = 1e9+7;
constexpr int  mod = mo;
constexpr int inf = 1<<30;
int main(){
    int n;
    cin>>n;
    vector<int> v(n);
    for(auto &a : v) cin>>a;
    vector<int> s;
    s.push_back(0);
    for(int i=0;i<n;++i){
        int m = (int)s.size();
        for(int j=0;j<m;++j){
            s.push_back(s[j]+v[i]);
        }
    }
    sort(s.rbegin(),s.rend());
    int ret = 0;
    for(auto a : s){
        if(a%10){ret = a;break;}
    }
    cout << ret << endl;
    return 0;
}



Compiler output:
a.cc:37:5: error: redefinition of 'int main()'
   37 | int main(){
      |     ^~~~
a.cc:6:5: note: 'int main()' previously defined here
    6 | int main(){
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
#include<iomanip>
#include<numeric>

using namespace std;
using ll = long long;
constexpr int mo = 1e9+7;
constexpr int  mod = mo;
constexpr int inf = 1<<30;
int main(){
    int n;
    cin>>n;
    vector<int> v(n);
    for(auto &a : v) cin>>a;
    vector<int> s;
    s.push_back(0);
    for(int i=0;i<n;++i){
        int m = (int)s.size();
        for(int j=0;j<m;++j){
            s.push_back(s[j]+v[i]);
        }
    }
    sort(s.rbegin(),s.rend());
    int ret = 0;
    for(auto a : s){
        if(a%10){ret = a;break;}
    }
    cout << ret << endl;
    return 0;
}

#include<bits/stdc++.h>
#include<iomanip>
#include<numeric>

using namespace std;
using ll = long long;
constexpr int mo = 1e9+7;
constexpr int  mod = mo;
constexpr int inf = 1<<30;
int main(){
    int n;
    cin>>n;
    vector<int> v(n);
    for(auto &a : v) cin>>a;
    vector<int> s;
    s.push_back(0);
    for(int i=0;i<n;++i){
        int m = (int)s.size();
        for(int j=0;j<m;++j){
            s.push_back(s[j]+v[i]);
        }
    }
    sort(s.rbegin(),s.rend());
    int ret = 0;
    for(auto a : s){
        if(a%10){ret = a;break;}
    }
    cout << ret << endl;
    return 0;
}



Compiler output:
a.cc:38:15: error: redefinition of 'constexpr const int mo'
   38 | constexpr int mo = 1e9+7;
      |               ^~
a.cc:7:15: note: 'constexpr const int mo' previously defined here
    7 | constexpr int mo = 1e9+7;
      |               ^~
a.cc:39:16: error: redefinition of 'constexpr const int mod'
   39 | constexpr int  mod = mo;
      |                ^~~
a.cc:8:16: note: 'constexpr const int mod' previously defined here
    8 | constexpr int  mod = mo;
      |                ^~~
a.cc:40:15: error: redefinition of 'constexpr const int inf'
   40 | constexpr int inf = 1<<30;
      |               ^~~
a.cc:9:15: note: 'constexpr const int inf' previously defined here
    9 | constexpr int inf = 1<<30;
      |               ^~~
a.cc:41:5: error: redefinition of 'int main()'
   41 | int main(){
      |     ^~~~
a.cc:10:5: note: 'int main()' previously defined here
   10 | int main(){
      |     ^~~~
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <stdbool.h>
// 与えられた大きさ n の int 型配列 array[]を comp で与えられたオプションでソートする
// qsort(array, size, sizeof(int),comp);
// 昇順オプション
int ASC(const int *a,const int *b){
return (*a - *b);

}
// 降順オプション
int DESC(const int *a,const int *b){
return (*b - *a);

}
int main(int argc, char const *argv[])
{
  int i,n,answer=0;
  int sum=0;
  int a[100];
  
  scanf("%d",&n);
  for(i=0;i<n;i++){
  scanf("%d",&a[i]);
  }
  qsort(a,n,sizeof(int),ASC);
  
  for(i=0;i<n;i++){
    sum+=a[i];
    if(sum%10==0)
      answer=sum;
}
  
  prinf("%d",answer);
  return 0;
}
  

Compiler output:
main.c: In function 'main':
main.c:28:25: error: passing argument 4 of 'qsort' from incompatible pointer type [-Wincompatible-pointer-types]
   28 |   qsort(a,n,sizeof(int),ASC);
      |                         ^~~
      |                         |
      |                         int (*)(const int *, const int *)
In file included from main.c:2:
/usr/include/stdlib.h:971:34: note: expected '__compar_fn_t' {aka 'int (*)(const void *, const void *)'} but argument is of type 'int (*)(const int *, const int *)'
  971 |                    __compar_fn_t __compar) __nonnull ((1, 4));
      |                    ~~~~~~~~~~~~~~^~~~~~~~
main.c:36:3: error: implicit declaration of function 'prinf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   36 |   prinf("%d",answer);
      |   ^~~~~
      |   printf
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <stdbool.h>
// 与えられた大きさ n の int 型配列 array[]を comp で与えられたオプションでソートする
// qsort(array, size, sizeof(int),comp);
// 昇順オプション
int ASC(const int *a,const int *b){
return (*a - *b);

}
// 降順オプション
int DESC(const int *a,const int *b){
return (*b - *a);

}
int main(int argc, char const *argv[])
{
  int n,answer=0;
  int sum=0;
  int a[100];
  
  scanf("%d",&n);
  for(i=0;i<n;i++){
  scanf("%d",&a[i]);
  }
  qsort(a,n,sizeof(int),ASC);
  
  for(i=0;i<n;i++){
    sum+=a[i];
    if(sum%10==0)
      answer=sum;
}
  
  prinf("%d",answer);
  return 0;
  

Compiler output:
main.c: In function 'main':
main.c:25:7: error: 'i' undeclared (first use in this function)
   25 |   for(i=0;i<n;i++){
      |       ^
main.c:25:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:28:25: error: passing argument 4 of 'qsort' from incompatible pointer type [-Wincompatible-pointer-types]
   28 |   qsort(a,n,sizeof(int),ASC);
      |                         ^~~
      |                         |
      |                         int (*)(const int *, const int *)
In file included from main.c:2:
/usr/include/stdlib.h:971:34: note: expected '__compar_fn_t' {aka 'int (*)(const void *, const void *)'} but argument is of type 'int (*)(const int *, const int *)'
  971 |                    __compar_fn_t __compar) __nonnull ((1, 4));
      |                    ~~~~~~~~~~~~~~^~~~~~~~
main.c:36:3: error: implicit declaration of function 'prinf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   36 |   prinf("%d",answer);
      |   ^~~~~
      |   printf
main.c:37:3: error: expected declaration or statement at end of input
   37 |   return 0;
      |   ^~~~~~
Language: C++

#include <bits/stdc++.h>
#define REP(i, a, b) for(int i = a; i < b; i++)
#define REP_(i, a, b) for(int i = a; i <= b; i++)
#define sl(n) scanf("%lld", &n);
#define si(n) scanf("%d", &n);
#define RepAll(a) for(auto x: a)
#define cout(ans) cout << ans << endl;
typedef long long ll;
//分数不为10的倍数的最大情况
using namespace std;

int main()
{
    int n, sum = 0, a;
    int MinAns = 256;
    cin>>n;
    REP(i, 0, n)
    {
        cin >> a;
        sum += a;
        if(a%10){
            MinAns = min(MinAns , a);
        }
    }
    /*
    if(sum%10) 
        printf("%d\n", sum);
	else 
        printf("%d\n", MinAns == 256 ? 0 :(sum-MinAns));
    return 0;
}


Compiler output:
a.cc:25:5: error: unterminated comment
   25 |     /*
      |     ^
a.cc: In function 'int main()':
a.cc:24:6: error: expected '}' at end of input
   24 |     }
      |      ^
a.cc:13:1: note: to match this '{'
   13 | {
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define int long long
#define ins(a,b,c) a.insert(a.begin()+b,c)
#define fo(a,b) for(int a=0;a<b;a++)
#define Sort(a) sort(a.begin(),a.end())
#define rev(a) reverse(a.begin(),a.end())
 int wari(int a,int b) {
   if(a%b==0)
     return a/b;
   else
     return a/b+1;
 }
 int keta(int a){
  double b=a;
  b=log10(b);
  int c=b;
  return c+1;
 }
 int souwa(int a){
  return a*(a+1)/2;
 }
 int lcm(int a,int b){
  int d=a,e=b,f;
  if(a<b)
    swap(a,b);
  int c,m=1;
  while(m){
    c=a%b;
    if(c==0){
       f=b;
      m--;
    }
    else{
      a=b;
      b=c;
 }
  }
  return d*e/f;
    }
  int gcm(int a,int b){
      int d=a,e=b,f;
  if(a<b)
    swap(a,b);
  int c,m=1;
  while(m){
    c=a%b;
    if(c==0){
       f=b;
      m--;
    }
    else{
      a=b;
      b=c;
 }
  }
  return f;
  }
 bool prime(int a){
   if(a<2)
     return false;
   else if(a==2)
     return true;
   else if(a%2==0)
     return false;
   double b=sqrt(a);
    for(int i=3;i<=b;i+=2){
      if(a%i==0){
        return false;
      }
    }
   return true;
 }
signed main(){
  int a,c=1,d=0;
  cin>>a;
  vector<int> b(a);
  fo(i,a)
    cin>>b[i].first;
  fo(i,a){
    if(b[i]%10!=0)
      c=0;
  }
  if(c)
    cout<<0<<endl;
  else{
    fo(i,a)
      d+=b[i];
    Sort(b);
    fo(i,a){
      if(b[i]%10!=0){
        d-=b[i];
        break;
      }
    }
    cout<<d<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:79:15: error: request for member 'first' in 'b.std::vector<long long int>::operator[](((std::vector<long long int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'}
   79 |     cin>>b[i].first;
      |               ^~~~~
Language: C++

#include <bits/stdc++.h>
#define ll long long 

using namespace std;

int main()
{
  int n;
  cin >> n;
  ll sum = 0;
  vector<int> v(n);
  for(int i = 0 ; i  <n ; i++){
    cin >> v[i];
    sum += v[i];
  }
  sort(v.begin(),v.end());
  int i = 0;
  while(sum % 10 == 0){
    sum -= v[i]
      i++;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:16: error: expected ';' before 'i'
   19 |     sum -= v[i]
      |                ^
      |                ;
   20 |       i++;
      |       ~
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>

#define _CRT_SECURE_NO_WARNINGS
#define TLong long long
#define TBMod 1000000007

int ASC(const int *a,const int *b){
	return (*a - *b);
}

int main(int argc, char const *argv[])
{	
	int n,s[100];
	int max = 0,min = 0x7F,pat,sum = 0;
	scanf("%d",&N);
	for (int i = 0; i < n; ++i){
		scanf(" %d",&s[i]);
		sum += s[i];
	}
	if(sum % 10 != 0){
		printf("%d\n",sum);
		return 0;
	}
	else{
		qsort(s,n,sizeof(int),ASC);
		for (int i = 0; i < n; ++i)
		{
			if(s[i] % 10 != 0){
				sum -= s[i];
				break;
			}
		}
		sum = (sum % 10 == 0) ? 0 : sum;
		printf("%d\n", sum);
	}
}


Compiler output:
main.c: In function 'main':
main.c:19:21: error: 'N' undeclared (first use in this function)
   19 |         scanf("%d",&N);
      |                     ^
main.c:19:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:29:39: error: passing argument 4 of 'qsort' from incompatible pointer type [-Wincompatible-pointer-types]
   29 |                 qsort(s,n,sizeof(int),ASC);
      |                                       ^~~
      |                                       |
      |                                       int (*)(const int *, const int *)
In file included from main.c:2:
/usr/include/stdlib.h:971:34: note: expected '__compar_fn_t' {aka 'int (*)(const void *, const void *)'} but argument is of type 'int (*)(const int *, const int *)'
  971 |                    __compar_fn_t __compar) __nonnull ((1, 4));
      |                    ~~~~~~~~~~~~~~^~~~~~~~
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<n;i++)
#define REPP(i,n) for(int i=1;i<=n;i++)
const double PI = acos(-1);
const double EPS = 1e-15;
long long INF=(long long)1E17;
#define i_7 (long long)(1E9+7)
long mod(long a){
    long long c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}
using namespace std;
bool prime(int n){
  if(n==1){
    return false;
  }else if(n==2){
    return true;
  }else{
    for(int i=2;i<=sqrt(n);i++){
      if(n%i==0){
        return false;
      }
    }
    return true;
  }
}

long long gcd(long long a, long long b){
  if(a<b){
    swap(a,b);
  }
  if(a%b==0){
    return b;
  }else{
    return gcd(b,a%b);
  }
}
 
long long lcm(long long x, long long y){
  return (x/gcd(x,y))*y;
}
 
class UnionFind {
    public:
    //各頂点の親の番号を格納する。その頂点自身が親だった場合は-(その集合のサイズ)を入れる。
    vector<int> Parent;
    
    //クラスを作るときは、Parentの値を全て-1にする。
    //以下のようにすると全てバラバラの頂点として解釈できる。
    UnionFind(int N) {
        Parent = vector<int>(N, -1);
    }
    
    //Aがどのグループに属しているか調べる
    int root(int A) {
        if (Parent[A] < 0) return A;
        return Parent[A] = root(Parent[A]);
    }
    
    //自分のいるグループの頂点数を調べる
    int size(int A) {
        return -Parent[root(A)];//先祖をrootで取っておきたい。
    }
    
    //AとBをくっ付ける
    bool connect(int A, int B) {
        //AとBを直接つなぐのではなく、root(A)にroot(B)をくっつける
        A = root(A);
        B = root(B);
        if (A == B) {
            //すでにくっついてるからくっ付けない
            return false;
        }
        
        //大きい方(A)に小さいほう(B)をくっ付けたい
        //大小が逆だったらAとBをひっくり返す。
        if (size(A) < size(B)) swap(A, B);
        
        //Aのサイズを更新する
        Parent[A] += Parent[B];
        //Bの親をAに変更する
        Parent[B] = A;
        
        return true;
    }
};

int main(){
  int n;
  cin>>n;
  int s[n];
  vector<int> tens,nots;
  int a=0;
  int ns=0;
  REP(i,n){
    cin>>s[i];
    a += s[i];
    if(s[i]%10==0){
      tens.push_back(s[i]);
    }else{
      ns += s[i];
      nots.push_back(s[i]);
    }
  }
  
  if(nots.size()==0){
    cout<<0<<endl;
  }else if(nots.size()==1){
    cout<<a<<endl;
  }else{
    if(a%10!==0){
      cout<<a<<endl;
    }else{
      sort(nots.begin(),nots.end());
      cout<<a-nots[0]<<endl;
    }
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:112:14: error: expected primary-expression before '=' token
  112 |     if(a%10!==0){
      |              ^
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<n;i++)
#define REPP(i,n) for(int i=1;i<=n;i++)
const double PI = acos(-1);
const double EPS = 1e-15;
long long INF=(long long)1E17;
#define i_7 (long long)(1E9+7)
long mod(long a){
    long long c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}
using namespace std;
bool prime(int n){
  if(n==1){
    return false;
  }else if(n==2){
    return true;
  }else{
    for(int i=2;i<=sqrt(n);i++){
      if(n%i==0){
        return false;
      }
    }
    return true;
  }
}

long long gcd(long long a, long long b){
  if(a<b){
    swap(a,b);
  }
  if(a%b==0){
    return b;
  }else{
    return gcd(b,a%b);
  }
}
 
long long lcm(long long x, long long y){
  return (x/gcd(x,y))*y;
}
 
class UnionFind {
    public:
    //各頂点の親の番号を格納する。その頂点自身が親だった場合は-(その集合のサイズ)を入れる。
    vector<int> Parent;
    
    //クラスを作るときは、Parentの値を全て-1にする。
    //以下のようにすると全てバラバラの頂点として解釈できる。
    UnionFind(int N) {
        Parent = vector<int>(N, -1);
    }
    
    //Aがどのグループに属しているか調べる
    int root(int A) {
        if (Parent[A] < 0) return A;
        return Parent[A] = root(Parent[A]);
    }
    
    //自分のいるグループの頂点数を調べる
    int size(int A) {
        return -Parent[root(A)];//先祖をrootで取っておきたい。
    }
    
    //AとBをくっ付ける
    bool connect(int A, int B) {
        //AとBを直接つなぐのではなく、root(A)にroot(B)をくっつける
        A = root(A);
        B = root(B);
        if (A == B) {
            //すでにくっついてるからくっ付けない
            return false;
        }
        
        //大きい方(A)に小さいほう(B)をくっ付けたい
        //大小が逆だったらAとBをひっくり返す。
        if (size(A) < size(B)) swap(A, B);
        
        //Aのサイズを更新する
        Parent[A] += Parent[B];
        //Bの親をAに変更する
        Parent[B] = A;
        
        return true;
    }
};

int main(){
  int n;
  cin>>n;
  int s[n];
  vector<int> tens,nots;
  int a=0;
  int n=0;
  REP(i,n){
    cin>>s[i];
    a += s[i];
    if(s[i]%10==0){
      tens.push_back(s[i]);
    }else{
      n += s[i];
      nots.push_back(s[i]);
    }
  }
  
  if(nots.size()==0){
    cout<<0<<endl;
  }else if(nots.size()==1){
    cout<<a<<endl;
  }else{
    if(s%10!==0){
      cout<<a<<endl;
    }else{
      sort(nots.begin(),nots.end());
      cout<<a-nots[0]<<endl;
    }
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:95:7: error: redeclaration of 'int n'
   95 |   int n=0;
      |       ^
a.cc:90:7: note: 'int n' previously declared here
   90 |   int n;
      |       ^
a.cc:112:9: error: invalid operands of types 'int [n]' and 'int' to binary 'operator%'
  112 |     if(s%10!==0){
      |        ~^~~
      |        | |
      |        | int
      |        int [n]
a.cc:112:14: error: expected primary-expression before '=' token
  112 |     if(s%10!==0){
      |              ^
Language: C

#include<stdio.h>
int main(){
	int N,i,j,a=0,b=0;
	scanf("%d",&N);
	int s[100];
	for(i=0;i<N;i++){
		scanf("%d",&s[i]);
		a+=s[i];
	}
	for(i=0;i<N;i++){
		for(j=i+1;j<N;j++){
			if(s[i]>s[j]){
				b=s[i];
				s[i]=s[j];
				s[j]=b;
			}
		}
	}
	if(a%10!=0){
		break;
	}else{
		for(i=0;i<N;i++){
			if((a-s[i])%10 !=0){
				a-=s[i];
				break;
			}
		}
		a=0;
	}
	printf("%d",a);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:17: error: break statement not within loop or switch
   20 |                 break;
      |                 ^~~~~
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) 
    Scanner scanner = new Scanner(System.in);
  
    int count = scanner.nextInt();
    int[] scores = new int[count];
    int sum = 0;
    for (int ix = 0; ix < scores.length; ix++) {
      scores[ix] = scanner.nextInt();
      sum += scores[ix];
    }
  
    Arrays.sort(scores);
    for (int ix = 0; ix < scores.length; ix++) {
      if (sum % 10 == 0) {
        System.out.println(sum);
        break;
      } else {
        sum -= scores[ix];
      }
    }
  }
}

Compiler output:
Main.java:4: error: ';' expected
  public static void main(String[] args) 
                                        ^
Main.java:10: error: illegal start of type
    for (int ix = 0; ix < scores.length; ix++) {
    ^
Main.java:10: error: > or ',' expected
    for (int ix = 0; ix < scores.length; ix++) {
                                       ^
Main.java:10: error: <identifier> expected
    for (int ix = 0; ix < scores.length; ix++) {
                                           ^
Main.java:15: error: <identifier> expected
    Arrays.sort(scores);
               ^
Main.java:15: error: <identifier> expected
    Arrays.sort(scores);
                      ^
Main.java:16: error: illegal start of type
    for (int ix = 0; ix < scores.length; ix++) {
    ^
Main.java:16: error: > or ',' expected
    for (int ix = 0; ix < scores.length; ix++) {
                                       ^
Main.java:16: error: <identifier> expected
    for (int ix = 0; ix < scores.length; ix++) {
                                           ^
Main.java:25: error: class, interface, enum, or record expected
}
^
10 errors
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>

int compar(const int *val1, const int *val2) {
	if (*val1 < *val2)  return -1;
	else if(*val1 == * val2)  return 0;
	else return 1;
}

void showScoreList(int s[],int n){
	printf("s = [ ");
	for (int i = 0; i < n; ++i)	printf("%d ", s[i]);
	printf("]\n");
}

int main(int argc, char const *argv[])
{	
	int N,s[100];
	int max = 0,min = 0x7F,pat,sum = 0;
	scanf("%d",&N);

	// Input
	for (int i = 0; i < N; ++i){
		scanf(" %d",&s[i]);
		sum += s[i];
	}

	// Output
	if(sum % 10 != 0){
		printf("%d\n",sum);
		return 0;
	}
	else{
		showScoreList(s,N);
		qsort(s,N, sizeof(int), (int (*)(const void *, const void *))compar);
		showScoreList(s,N);
		for (int i = 0; i < N; ++i)
		{
			if(sum % 10 != 0){
				sum -= s[i];
				break;
		}
		sum = (sum % 10 == 0) ? 0 : sum;
		printf("%d\n", sum);
	}
}

Compiler output:
main.c: In function 'main':
main.c:49:1: error: expected declaration or statement at end of input
   49 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(int argc, char const *argv[])
{
	int N,sum = 0;
	cin >> N;
	std::vector<int> s(N);
	for (int i = 0; i < N; ++i){
		cin >> s.at(i);
		sum += s.at(i);
	}
	if(sum % 10 != 0){
		cout << sum << endl;
		return 0;
	}
	else{
		sort(s.begin(), s.end());
		for (int i = 0; i < N ; ++i)
		 {
		 	 if(s.at(i) % 10 != 0){
		 	 	sum -= s.at(i);
		 	 	break;
		 }
		cout << sum << endl;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:28:2: error: expected '}' at end of input
   28 | }
      |  ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include <cstdio>

#define min(a, b) (a < b ? a : b)

int main()
{
    int no_of_elements;
    scanf("%d", &no_of_elements);

    const int oo = 1e9 + 9;
    int sum = 0, min_non_multiple_10 = oo;

    while(no_of_elements--)
    {
        int element;
        scanf("%d", &element);

        sum += element;

        if(element%10 != 0)
            min_non_multiple_10 = min(min_non_multiple_10, element);
    }

    if(sum%10 == 0)
        printf("%d\n", max_non_multiple_10 == oo ? 0 : sum - min_non_multiple_10);
    else
        printf("%d\n", sum);

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:24: error: 'max_non_multiple_10' was not declared in this scope; did you mean 'min_non_multiple_10'?
   25 |         printf("%d\n", max_non_multiple_10 == oo ? 0 : sum - min_non_multiple_10);
      |                        ^~~~~~~~~~~~~~~~~~~
      |                        min_non_multiple_10
Language: C++

#include<cstdlib>
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
using namespace std;
typedef long long lng;
#define UP(i,a,b) for(int i=(a); i<=(b); ++i)
#define DOWN(i,b,a) for(int i=(b); i>=(a); --i)
#define REP(i,n) UP(i,0,n-1)
#define ALL(a) (a).begin(), (a).end()
#define UNIQUE(a) a.erase(unique(ALL(a)), a.end()) //NOTE: <a> must be sorted in advance

lng power(lng b, int n) {lng sol=1; while(n>0) {if(n&1) {sol=sol*b;} n>>=1; b*= b;} return sol;} //calculate b^n

const int MOD = 1000000007; //10^9+7
const double PI = 3.1415926535897932384626;

/*********** variables ************/
int N;
int s[101];
int dp[10010];
/**********************************/

void dpSol() {
    DOWN(i, 100, 1) {
        s[i] = s[i-1];
    }
    dp[0][0] = 0;
    UP(i, 1, 100) {
        DOWN(j, 10000, 0) {
            if(dp[j]) {
                dp[j+s[i]] = true;
            }
        }
    }
    int ans = 0;
    UP(i, 10000) {
        if(dp[i]&&i%10!=0) {
            ans = max(ans, i);
        }
    }
    cout << ans << endl;
}

void mySol() {
    int mini = 1<<30;
    int sum = 0;
    REP(i, N) {
        sum += s[i];
        if(s[i]%10!=0&&s[i]<mini) {
            mini = s[i];
        }
    }
    if(sum%10!=0) {
        cout << sum << endl;
    }
    else if(mini!= 1<<30) {
        cout << sum - mini << endl;
    }
    else {
        cout << 0 << endl;
    }
}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cin>>N;
    REP(i, N) cin >> s[i];

    //mySol();
    dpSol();
}


Compiler output:
a.cc:38:16: error: macro "UP" requires 3 arguments, but only 2 given
   38 |     UP(i, 10000) {
      |                ^
a.cc:8:9: note: macro "UP" defined here
    8 | #define UP(i,a,b) for(int i=(a); i<=(b); ++i)
      |         ^~
a.cc: In function 'void dpSol()':
a.cc:29:10: error: invalid types 'int[int]' for array subscript
   29 |     dp[0][0] = 0;
      |          ^
a.cc:38:5: error: 'UP' was not declared in this scope
   38 |     UP(i, 10000) {
      |     ^~
Language: C++

#include <iostream>
#include <algorithm>
#include <cstdio>
using namespace std;
typedef long long ll;
int n,ans;
bool dp[10105];
int main(void){
    scanf("%d",&n);
    dp[0]=true;
    while(n--){
        int s;
        scanf("%d",&s);
        for(int i=10000;i>=0;i--)if(dp[i])dp[i+s]=true;
    }
    for(int i=10000;i>=0;i--){
        if(i%10&&dp[i])[
            ans=i;
            break;
        }
    }
    printf("%d\n",ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:18: error: expected ',' before ';' token
   18 |             ans=i;
      |                  ^
      |                  ,
a.cc:18:18: error: expected identifier before ';' token
a.cc:18:18: error: expected ']' before ';' token
   18 |             ans=i;
      |                  ^
      |                  ]
a.cc: In lambda function:
a.cc:18:18: error: expected '{' before ';' token
a.cc: At global scope:
a.cc:22:11: error: expected constructor, destructor, or type conversion before '(' token
   22 |     printf("%d\n",ans);
      |           ^
a.cc:23:1: error: expected declaration before '}' token
   23 | }
      | ^
Language: C++



int main(){
    int n;
    cin >> n;

    int s[n+1];
    for(int i = 0;i < n; i++){
        cin >> s[i];
    }

    bool dp[110][110 * 100];
    memset( dp, 0 ,sizeof(dp));
    dp[0][0] = true;

    for(int i = 0;i < n; i++){
        for(int j=0; j <= 100 * n;j++){
            if(j<s[i]) dp[i+1][j] = dp[i][j];
            else dp[i+1][j] = dp[i][j]|| dp[i][j-s[i]];
        }
    }

    int j;
    for(j=10004;j>=1;j--){
        if(dp[n][j]==true&&j%10!=0)break;
    }
    cout<<j<<endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin >> n;
      |     ^~~
a.cc:13:5: error: 'memset' was not declared in this scope
   13 |     memset( dp, 0 ,sizeof(dp));
      |     ^~~~~~
a.cc:1:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
  +++ |+#include <cstring>
    1 | 
a.cc:27:5: error: 'cout' was not declared in this scope
   27 |     cout<<j<<endl;
      |     ^~~~
a.cc:27:14: error: 'endl' was not declared in this scope
   27 |     cout<<j<<endl;
      |              ^~~~
Language: C++



int main(){
    int n;
    cin >> n;

    int s[n+1];
    for(int i = 0;i < n; i++){
        cin >> s[i];
    }

    bool dp[110][110 * 100];
    memset( dp, 0 ,sizeof(dp));
    dp[0][0] = true;

    for(int i = 0;i < n; i++){
        for(int j=0; j <= 100 * n;j++){
            if(j<s[i]) dp[i+1][j] = dp[i][j];
            else dp[i+1][j] = dp[i][j]|| dp[i][j-s[i]];
        }
    }

    int j;
    for(j = 10004;j>=1;j--){
        if(dp[n][j]==true&&j%10!=0)break;
    }
    cout<<j<<endl;

    //cout<< maxi <<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin >> n;
      |     ^~~
a.cc:13:5: error: 'memset' was not declared in this scope
   13 |     memset( dp, 0 ,sizeof(dp));
      |     ^~~~~~
a.cc:1:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
  +++ |+#include <cstring>
    1 | 
a.cc:27:5: error: 'cout' was not declared in this scope
   27 |     cout<<j<<endl;
      |     ^~~~
a.cc:27:14: error: 'endl' was not declared in this scope
   27 |     cout<<j<<endl;
      |              ^~~~
Language: C

#include <stdio.h>

void swap(int *xp, int *yp)
{
    int temp = *xp;
    *xp = *yp;
    *yp = temp;
}

void bubbleSort(int arr[], int n)
{
    int i, j;
    for (i = 0;i < n - 1; i++)
        for (j = 0; j < n - i - 1; j++)
            if (arr[j] > arr[j + 1])
                swap(&arr[j], &arr[j + 1]);
}

int main(void)
{
    int n;
    scanf("%d", &n);

    int s[n];
    int i;
    for (i = 0; i < n; i++)
        scanf("%d", &s[i]);
    
    bubbleSort(s, n);

    int sum = 0;
    for (i = 0; i < n; i++)
        sum += s[i];
    
    if (sum % 10 == 0) {
        printf("%d\n", sum);
        return 0;
    }
    else {
        for (i = 0; i < n; i++)
            if (s[i] % 10) {
                j = s[i];
                printf("%d\n", sum - j);
                return 0;
            }
    }
    printf("0\n");
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:42:17: error: 'j' undeclared (first use in this function)
   42 |                 j = s[i];
      |                 ^
main.c:42:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <string>
using namespace std;
int main() {
	int n, ans = 0;
	cin >> n;
	int s[n];
	for (int i = 0; i < n; i++) {
		cin >> s[i];
		ans += s[i];
	}
	sort(s, s + n);
	if (ans % 10 == 0){
        for (i = 0; i < n; i++){
            if (s[i] % 10 != 0){
                ans -= s[i];
                cout << ans << endl;
                return 0;
            }
        }
    }
	cout << 0 << endl;
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:16:14: error: 'i' was not declared in this scope
   16 |         for (i = 0; i < n; i++){
      |              ^
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int n;
int a[101];
long long sum;
int main()
{
	cin>>n;
	for(int i=1;i<=n;i++) 
	{
		cin>>a[i];
		sum+=a[i];
	} 
	sort(a+1,a+n+1);
	int k=1;
	while(sum%10==0&&k<=nd)
	{
		sum-=a[k];
		k++;
	}
	cout<<sum;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:29: error: 'nd' was not declared in this scope; did you mean 'n'?
   17 |         while(sum%10==0&&k<=nd)
      |                             ^~
      |                             n
Language: C

//
// Created by Akifumi Ohata on 2017/09/29.
//


#include<iostream>
#include <vector>
#include <numeric>

using namespace std;

int main(){

    int N;

    cin >> N ;

    std::vector<int> scores;

    for(int n=0;n<N ;n++) {
        int tmp;
        cin >>tmp;

        scores.push_back(tmp);

    }

    std::sort(scores.begin(),scores.end());

    ONEMOER:

    int score_sum =std::accumulate(scores.begin(), scores.end(), 0);


    if(score_sum%10 ==0 && score_sum !=0){


        scores.erase(scores.begin());

        goto ONEMOER;

    }



    cout << score_sum <<endl;

    return 0;
}

Compiler output:
main.c:6:9: fatal error: iostream: No such file or directory
    6 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C++

#include "IntMod.h"
typedef IntMod<1000000007> MInt;

//#include "Union_Find.h"

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
#include <utility>
#include <algorithm>
#include <functional>
#include <cmath>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <iomanip>
#include <sstream>
#include <numeric>
#include <list>
#include <bitset>

using namespace std;
#define REP(i,a,n) for(int i = (a); i < (int)(n); ++i)
#define REPM(i,n,a) for(int i = ((n) - 1); i >= (a); --i)
#define EPS 0.0001
#define INF 0x3FFFFFFF
#define INFLL 0x3FFFFFFF3FFFFFFF
#define INFD 1.0e+308
#define FLOAT setprecision(16)
typedef long long LL;
typedef unsigned long long ULL;
typedef pair<LL, LL> PP;

template <class T, class U>
istream& operator>>(istream& ist, pair<T, U>& right) { return ist >> right.first >> right.second; }
template <class T, class U>
ostream& operator<<(ostream& ost, pair<T, U>& right) { return ost << right.first << ' ' << right.second; }
template <class T, class TCompatible, size_t N>
void Fill(T(&dest)[N], const TCompatible& val) { fill(begin(dest), end(dest), val); }
template <class T, class TCompatible, size_t M, size_t N>
void Fill(T(&dest)[M][N], const TCompatible& val) { for (int i = 0; i < M; ++i) Fill(dest[i], val); }
//sum
#if 1
#include <array>
#include <unordered_set>
#include <unordered_map>
template<class T>
using PriorityQ = priority_queue<T, vector<T>, greater<T> >;	// コスト小を優先
#endif

int N;
set<int> s;
LL sum = 0;
int main() {
	cin >> N;
	REP(i, 0, N) {
		int a;
		cin >> a;
		s.insert(a);
		sum += a;
	}

	int d = INF;
	for (int a : s) {
		if (a % 10 != 0) {
			d = a; break;
		}
	}
	cout << (sum % 10 == 0 ? (d == INF ? 0 : sum - d) : sum) << endl;
	return 0;
}

Compiler output:
a.cc:1:10: fatal error: IntMod.h: No such file or directory
    1 | #include "IntMod.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

import sys

N = int(input())
s = list()
for i in range(N):
	s.append(int(input()))

s.sort(reverse=True)

print(s)

point = sum(s)
l = len(s)
i = 0

while i < 1:
	if point % 10 != 0:
		print(point)
		sys.exit()
	if not s == []:
		point -= s.pop()
	i += 1

print("0")

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main(void){
 int n; cin >> n;
 int m = INT_MAX, sum = 0;
 int s[n]; for(int i=0;i<n;i++){
  cin >> s[i]; if (s[i] < m && s[i]%10) m = s[i];
  sum += s[i];
 }
 if (m == INT_MAX) ans = 0; else ans = sum - m;
 cout << ans << endl;
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:20: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |  if (m == INT_MAX) ans = 0; else ans = sum - m;
      |                    ^~~
      |                    abs
a.cc:11:34: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |  if (m == INT_MAX) ans = 0; else ans = sum - m;
      |                                  ^~~
      |                                  abs
a.cc:12:10: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 |  cout << ans << endl;
      |          ^~~
      |          abs
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
 long long int i,n,a,b,low=0,high=2000000000,ans=2000000000,s[100009],mid,z;
cin>>n>>a>>b;
for(i=0;i<n;i++)
cin>>s[i];
while(low<=high)
{ 
  z=0;
  mid=(low+high)/2;
  for(i=0;i<n;i++)
  {
    if(a[i]>mid*b)
    {
       z=z+ceil((1.0*(s[i]-mid*b))/(s-b));
    }
   }
  if(z<mid)
  {
    ans=min(ans,z);
    high=mid-1;
  }
  else 
  low=mid+1;
}
cout<<ans;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: invalid types 'long long int[long long int]' for array subscript
   15 |     if(a[i]>mid*b)
      |         ^
a.cc:17:35: error: invalid operands of types 'double' and 'long long int*' to binary 'operator/'
   17 |        z=z+ceil((1.0*(s[i]-mid*b))/(s-b));
      |                 ~~~~~~~~~~~~~~~~~~^~~~~~
      |                     |                |
      |                     double           long long int*
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main()
{
 long long int i,n,a,b,low=0,high=2000000000,ans=2000000000,s[100009],mid;
cin>>n>>a>>b;
for(i=0;i<n;i++)
cin>>s[i];
while(low<=high)
{ 
  z=0;
  mid=(low+high)/2;
  for(i=0;i<n;i++)
  {
    if(a[i]>mid*b)
    {
       z=z+ceil((1.0*(a[i]-mid*b))/(a-b));
    }
   }
  if(z<mid)
  {
    ans=min(ans,z);
    high=mid-1;
  }
  else 
  low=mid+1;
}
cout<<ans;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: 'z' was not declared in this scope
   12 |   z=0;
      |   ^
a.cc:16:9: error: invalid types 'long long int[long long int]' for array subscript
   16 |     if(a[i]>mid*b)
      |         ^
a.cc:18:24: error: invalid types 'long long int[long long int]' for array subscript
   18 |        z=z+ceil((1.0*(a[i]-mid*b))/(a-b));
      |                        ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
{
 long long int i,n,a,b,low=0,high=2000000000,ans=2000000000,s[100009],mid;
cin>>n>>a>>b;
for(i=0;i<n;i++)
cin>>s[i];
while(low<=high)
{ 
  z=0;
  mid=(low+high)/2;
  for(i=0;i<n;i++)
  {
    if(a[i]>mid*b)
    {
       z=z+ceil((1.0*(a[i]-mid*b))/(a-b));
    }
   }
  if(z<mid)
  {
    ans=min(ans,z);
    high=mid-1;
  }
  else 
  low=mid+1;
}
cout<<ans;
return 0;
}

Compiler output:
a.cc:3:1: error: expected unqualified-id before '{' token
    3 | {
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

//{{{
/********************************************************************/
struct Fast {Fast(){std::cin.tie(0);ios::sync_with_stdio(false);}} fast;

typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<vector<int> > vii;
typedef queue<int> qi;
typedef stack<int> si;
typedef deque<int> dqi;

#define reps(i, a, b) for (int i = a; i < b; ++i)
#define rep(i, n) reps(i, 0, n)
#define REPS(i, a, b) reps(i, a, b)
#define REP(i, n) rep(i, n)
#define deps(i, a, b) for (int i = a; i >= b; --i)
#define dep(i, n) deps(i, n, 0)
#define DEPS(i, a, b) deps(i, a, b)
#define DEP(i, n) dep(i, n)

#define pf push_front
#define pb push_back
#define mp make_pair
#define fst first
#define FST fst
#define sec second
#define SEC sec
#define sz(obj) ((int)(obj).size())
#define all(v) (v).begin(), (v).end()
#define ALL(v) all(v)
#define endl '\n'

const int INF = 999999999;
const int MOD = 1e9 + 7;
const int dx[] = {0, 1, 0, -1, 1, 1, -1, -1}, dy[] = {1, 0, -1, 0, 1, -1, -1, 1};

inline bool inside(int y, int x, int H, int W) { return y >= 0 && x >= 0 && y < H && x < W; }
inline int in() { int x; std::cin >> x; return x; }
template <typename T>
void print(std::vector<T>& v, char c = ' ') {
  REP(i, v.size()) {
    if (i != 0) std::cout << c;
    std::cout << v[i];
  }
  std::cout << '\n';
}
template <typename T> void print(T x) { std::cout << x << '\n'; }

/****************************************************************/
//}}}

signed main()
{
  int n = in();
  int sum = 0, cnt = 0;
  vi v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
    sum += v[i];
    if (v[i] % 10 == 0) cnt++;
  }
  if (cnt == n) ans = 0;

  sort(all(v));
  for (int i = 0; sum % 10 == 0 and sum != 0; i++) {
    if (v[i] % 10 == 0) continue;
    sum -= v[i];
  }

  cout << sum << endl;

  return (0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:66:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   66 |   if (cnt == n) ans = 0;
      |                 ^~~
      |                 abs
Language: C++

using System;
using System.Linq;

class Program
{
    public static void Main(string[] args)
    {
        int N = int.Parse(System.Console.ReadLine());

        int total = 0, oddMin = int.MaxValue;
        for (int i = 0; i < N; i++)
        {
            int score = int.Parse(System.Console.ReadLine());

            total += score;
            if (score<oddMin & score % 10 != 0)
            {
                oddMin = score;
            }
        }

        if (total % 10 == 0)
        {
            if (oddMin == int.MaxValue)
            {
                total = 0;
            }
            else
            {
                total -= oddMin;
            }
        }

        System.Console.WriteLine(total);
    }
}



Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Linq;
      |       ^~~~~~
a.cc:6:11: error: expected ':' before 'static'
    6 |     public static void Main(string[] args)
      |           ^~~~~~~
      |           :
a.cc:6:29: error: 'string' has not been declared
    6 |     public static void Main(string[] args)
      |                             ^~~~~~
a.cc:6:38: error: expected ',' or '...' before 'args'
    6 |     public static void Main(string[] args)
      |                                      ^~~~
a.cc:36:2: error: expected ';' after class definition
   36 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Program::Main(int*)':
a.cc:8:17: error: expected primary-expression before 'int'
    8 |         int N = int.Parse(System.Console.ReadLine());
      |                 ^~~
a.cc:10:33: error: expected primary-expression before 'int'
   10 |         int total = 0, oddMin = int.MaxValue;
      |                                 ^~~
a.cc:13:25: error: expected primary-expression before 'int'
   13 |             int score = int.Parse(System.Console.ReadLine());
      |                         ^~~
a.cc:24:27: error: expected primary-expression before 'int'
   24 |             if (oddMin == int.MaxValue)
      |                           ^~~
a.cc:24:27: error: expected ')' before 'int'
a.cc:24:16: note: to match this '('
   24 |             if (oddMin == int.MaxValue)
      |                ^
a.cc:34:9: error: 'System' was not declared in this scope
   34 |         System.Console.WriteLine(total);
      |         ^~~~~~
Language: C++

#include<iostream>
using namespace std;

int main() {
	int n=0,k=0,r=0;
	int a[2*10^50];
	cin >> n;
	cin >> k;

	for (int i = 0; i < n; i++) {
		cin >> a[i];
	}

	for (int i = 0; i < n; ++i) {
		int z = 0;
		for (int j = i; j < n; ++j)
		{
			z += a[j];
			r++

		}
	}
	cout << r << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:28: error: expected ';' before '}' token
   19 |                         r++
      |                            ^
      |                            ;
   20 | 
   21 |                 }
      |                 ~
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>

using namespace std;

int main(){
    int n=0;
    vector<int> s;
    int inputS;
    int sum;
    bool tf=false;
    int search=0;

    cin>>n;

    for(int i=0;i<n;i++){
        cin>>inputS;
        s.push_back(inputS);
    }

    for(int i=0;i<n;i++{
        if(s[i]%10==0){
            search++;
        }
    }
    if(search==n){
        tf=true;
    }

    sort(s.begin(),s.end());

    for(int j=0;j<n;j++){
        if(j==0){
            for(int i=0;i<n;i++){
                sum+=s[i];
            }
        }
        
        if(sum%10==0){
            if(s[j]%10!=0||tf){
                sum-=s[j];
            }
        }
        else{
            break;
        }
    }

    cout<<sum<<endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:24: error: expected ')' before '{' token
   22 |     for(int i=0;i<n;i++{
      |        ~               ^
      |                        )
Language: Java

import java.util.Arrays;
import java.util.Scanner;
 
    class Main {
      public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
 
    int N = sc.nextInt();
    int S[];
    int s = 0;
    Arrays.sort(S);

    for(int i = 0; i < N; i++) {
    S[i] = sc.nextInt();
    s += S[i];
    }
    
    if(s % 10 != 0) {
        System.out.println(s);
        return;
    }else {
         for(int i = 0; i < N; i++)
              if(S[i] % 10 != 0) {
                      System.out.println(s -= S[i]);
                      return;
              }
         }
        System.out.println(0);
        return ;
  }
}

Compiler output:
Main.java:11: error: variable S might not have been initialized
    Arrays.sort(S);
                ^
1 error
Language: Java

import java.util.Arrays;
import java.util.Scanner;
 
    class Main {
      public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
 
    int N = sc.nextInt();
    int S[] = new int[N];
    for(int i = 0; i < N; i++) {
    S[i] = sc.nextInt();
    }
    
    int s = 0;
    for(int i = 0; i < N; i++) {
    s += S[i];
    }
    Arrays.sort(S);
        for(int i = 0; i < N; i++) {
            if(s % 10 != 0) {
              System.out.println(s);
            return;
            }else {
              s -= S[i];
            }
        }
        System.out.println(0);
        return 0;
  }
}

Compiler output:
Main.java:28: error: incompatible types: unexpected return value
        return 0;
               ^
1 error
Language: Java

 import java.util.Scanner;
 
    class Main {
      public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
 
    int N = sc.nextInt();
    int S[] = new int[N];
    for(int i = 0; i < N; i++) {
    S[i] = sc.nextInt();
    }
    
    int s = 0;
    for(int i = 0; i < N; i++) {
    s += S[i];
    }
    Arrays.sort(S[]);
        for(int i = 0; i < N; i++) {
            if(s % 10 != 0) {
              System.out.println(s);
            return;
            }else {
              s -= S[i];
            }
        }
        System.out.println(0);
  }
}

Compiler output:
Main.java:17: error: '.class' expected
    Arrays.sort(S[]);
                   ^
1 error
Language: Java

 import java.util.Scanner;
 
    class Main {
      public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
 
    int N = sc.nextInt();
    int S[] = new int[N];
    for(int i = 0; i < N; i++) {
    S[i] = sc.nextInt();
    }
    
    int s = 0;
    for(int i = 0; i < N; i++) {
    s += S[i];
    }
    Arrays.sort(S);
        for(int i = 0; i < N; i++) {
            if(s % 10 != 0) {
              System.out.println(s);
            return;
            }else {
              s -= S[i];
            }
        }
        System.out.println(0);
  }
}

Compiler output:
Main.java:17: error: cannot find symbol
    Arrays.sort(S);
    ^
  symbol:   variable Arrays
  location: class Main
1 error
Language: Java

   import java.util.Scanner;
 
    class Main {
      public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
 
    int N = sc.nextInt();
    int S[];
    for(int i = 0; i < N; i++) {
    S[i] = sc.nextInt();
    }
    
    int s = 0;
    for(int i = 0; i < N; i++) {
    s += S[i];
    }
    Arrays.sort(S[]);
        for(int i = 0; i < N; i++) {
            if(s % 10 != 0) {
              System.out.println(s);
            return;
            }else {
              s -= S[i];
            }
        }
        System.out.println(0);
  }
}

Compiler output:
Main.java:17: error: '.class' expected
    Arrays.sort(S[]);
                   ^
1 error
Language: Java

   import java.util.Scanner;
 
    class Main {
      public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
 
    int N = sc.nextInt();
    int S[];
    for(int i = 0; i < N; i++) {
    S[i] = sc.nextInt();
    }
    
    int s = 0;
    for(int i = 0; i < N; i++) {
    s += S[i];
    }
    Arrays.sort(S[]);
        for(int i = 0; i < N; i++) {
            if(s % 10 != 0) {
              System.out.println(s);
            return;
            }else {
              s -= S[i];
            }
        }
  }
}

Compiler output:
Main.java:17: error: '.class' expected
    Arrays.sort(S[]);
                   ^
1 error
Language: Java

   import java.util.Scanner;
 
    class Main {
      public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
 
    int N = sc.nextInt();
    int S[];
    for(int i = 0; i < N; i++) {
    S[i] = sc.nextInt();
    }
    
    int s = 0;
    for(int i = 0; i < N; i++) {
    s += S[i];
    }
    Arrays.sort(S);
        for(int i = 0; i < N; i++) {
            if(s % 10 != 0) {
              System.out.println(s);
            return;
            }else {
              s -= S[i];
            }
        }
  }
}

Compiler output:
Main.java:17: error: cannot find symbol
    Arrays.sort(S);
    ^
  symbol:   variable Arrays
  location: class Main
1 error
Language: Java

   import java.util.Scanner;
 
    class Main {
      public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
 
    int N = sc.nextInt();
    int S[];
    for(int i = 0; i < N; i++) {
    S[i] = sc.nextInt();
    }
    
    int s = 0;
    for(int i = 0; i < N; i++) {
    s += S[i];
    }
    Arrays.sort(S);
        for(int i = 0; i < N; i++) {
            if(s % 10 != 0) {
              System.out.println(s);
            return;
            }else {
              s -= S[i];
            }
        }
  }

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

   import java.util.Scanner;

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

    int N = sc.nextInt();
    int S[];
    for(int i = 0; i < N; i++) {
    S[i] = sc.nextInt();
    }
    
    int s = 0;
    for(int i = 0; i < N; i++) {
    s += S[i];
    }
    Arrays.sort(S);
        for(int i = 0; i < N; i++) {
            if(s % 10 != 0) {
              System.out.println(s);
            return;
            }else {
              s -= S[i];
            }
        }
    
    

    

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