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

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

int main(){
 long long N,u,c,ans;
  cin>>N;
  ans=100000000000;
  c=0;
  vector<long long>s(N);
    for(int i=0;i<N;i++){
      cin>>s[i];
c+=s[i];
    }
  if(c%10!=0){
    cout<<c<<endl;
    return 0;
  }
  else{
     for(int i=0;i<N-1;i++){
      if(s[i]%10==0){
        continue;
      }
       else{
         cout<c-s[i]<<endl;
         return 0;
       }
     }
  }
      cout<<0<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:21: error: invalid operands of types 'long long int' and '<unresolved overloaded function type>' to binary 'operator<<'
   24 |          cout<c-s[i]<<endl;
      |               ~~~~~~^~~~~~
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include <string.h>
using namespace std;
#define REP(i,m,n) for(int i=(int)m ; i < (int) n ; ++i )
#define rep(i,n) REP(i,0,n)
typedef long long ll;
typedef pair<int,int> pint;
typedef pair<ll,int> pli;
const int inf=1e9+7;
const ll longinf=1LL<<60 ;
const ll mod=1e9+7 ;

int dp[100100];
int ans;
int m[1000];
int a[1000];
int n;
bool flag;
int ans;

void solve(int K){
  memset(dp,-1,sizeof(dp));
  dp[0]=0;
  rep(i,n){
    rep(j,K+1){
      if(dp[j]>=0){
        dp[j]=m[i];
      }else if(j<a[i] || dp[j-a[i]]<=0){
        dp[j]=-1;
      }else{
        dp[j]=dp[j-a[i]]-1;
      }
    }
  }
  if(dp[K]>=0 && K%10!=0){
    ans=max(ans,K);
  }
}

int main(){
  int sum=0;
  flag=false;
  int N;
  cin >> N;
  vector<int> s(N);
  rep(i,N)cin >> s[i];
  sort(s.begin(),s.end());
  int temp=0;
  rep(i,N)sum+=s[i];
  int cnt=0;
  while(temp<N){
    m[cnt]=upper_bound(s.begin(),s.end(),s[temp])-lower_bound(s.begin(),s.end(),s[temp]);
    a[cnt]=s[temp];
    temp=upper_bound(s.begin(),s.end(),s[temp])-s.begin();
    cnt++;
  }
  n=cnt;
  
  for(int i=sum;i>=0;i--){
    solve(i);
    if(flag || i==0){
      cout << i << endl;
      return 0;
    }
  }
return 0;}

Compiler output:
a.cc:31:5: error: redefinition of 'int ans'
   31 | int ans;
      |     ^~~
a.cc:26:5: note: 'int ans' previously declared here
   26 | int ans;
      |     ^~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   14 |     sort(s.begin(), s.end());
      |     ^~~~
      |     short
Language: C

#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
  int n,i;
  cin >> n;
  int sum=0;
  vector<int> a(n);
  for(i=0;i<n;i++){
    cin >> a[i];
    sum+=a[i];
  }
  sort(a.begin(),a.end());
  if(sum%10==0){
    for(i=0;a[i]%10==0&&i<n;i++);
    sum-=a[i];
    if(i==n)sum=0;
  }
  cout << sum << endl;
}

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

#include <bits/stdc++.h>
using namespace std;
int main() {
	int n,ans=0;
	cin >> n;
	vector<int> da(n);
	for (int i = 0;i < n;i++) {
		cin >> da[i];
		ans += da[i];
	}
	sort(da.begin(), da.end());
	int i = 0;
	while (da[i]%10==0&&i!=n) {
		i++;
	}
	if (i == n)
		cout << 0 << endl;
	else
		cout << ans - da[i] << endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:19:45: error: expected '}' at end of input
   19 |                 cout << ans - da[i] << endl;
      |                                             ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C++

include <bits/stdc++.h>
using namespace std;
int main() {
	int n,ans=0;
	cin >> n;
	vector<int> da(n);
	for (int i = 0;i < n;i++) {
		cin >> da[i];
		ans += da[i];
	}
	sort(da.begin(), da.end());
	int i = 0;
	while (da[i]%10==0&&i!=n) {
		i++;
	}
	if (i == n)
		cout << 0 << endl;
	else
		cout << ans - da[i] << endl;


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope
    5 |         cin >> n;
      |         ^~~
a.cc:6:9: error: 'vector' was not declared in this scope
    6 |         vector<int> da(n);
      |         ^~~~~~
a.cc:6:16: error: expected primary-expression before 'int'
    6 |         vector<int> da(n);
      |                ^~~
a.cc:8:24: error: 'da' was not declared in this scope
    8 |                 cin >> da[i];
      |                        ^~
a.cc:11:14: error: 'da' was not declared in this scope
   11 |         sort(da.begin(), da.end());
      |              ^~
a.cc:11:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   11 |         sort(da.begin(), da.end());
      |         ^~~~
      |         short
a.cc:17:17: error: 'cout' was not declared in this scope
   17 |                 cout << 0 << endl;
      |                 ^~~~
a.cc:17:30: error: 'endl' was not declared in this scope
   17 |                 cout << 0 << endl;
      |                              ^~~~
a.cc:19:17: error: 'cout' was not declared in this scope
   19 |                 cout << ans - da[i] << endl;
      |                 ^~~~
a.cc:19:40: error: 'endl' was not declared in this scope
   19 |                 cout << ans - da[i] << endl;
      |                                        ^~~~
a.cc:19:45: error: expected '}' at end of input
   19 |                 cout << ans - da[i] << endl;
      |                                             ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C++

#include <vector>
#include <cstdio>
#include <iostream>
#include <cmath>
#include <string>
#include <cstring>
#include <algorithm>
#include <numeric>
#include <cstdlib>
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define REP(i,n) for(int i=0;i<n;i++)
#define SORT(c) sort((c).begin(),(c).end())
#define ALL(a) (a).begin(),(a).end()

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);

  int n;
  cin >> n;
  int total = 0;
  vector<int> not_ten_times;
  REP(i, n) {
    int tmp;
    cin >> tmp;
    total += tmp;
    if(tmp % 10 != 0) {
      not_ten_times.push_back(tmp);
    }
  }

  if(total % 10 != 0) {
    cout << total << endl;
    return 0;
  }

  SORT(not_ten_times);

  REP(i, not_ten_times.length()) {
    total -= not_ten_times[i];
    if(total % 10 != 0) {
      cout << total << endl;
      return 0;
    }
  }

  cout << 0 << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:42:24: error: 'class std::vector<int>' has no member named 'length'
   42 |   REP(i, not_ten_times.length()) {
      |                        ^~~~~~
a.cc:14:32: note: in definition of macro 'REP'
   14 | #define REP(i,n) for(int i=0;i<n;i++)
      |                                ^
Language: C++

#include <vector>
#include <cstdio>
#include <iostream>
#include <cmath>
#include <string>
#include <cstring>
#include <algorithm>
#include <numeric>
#include <cstdlib>
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define REP(i,n) for(int i=0;i<n;i++)
#define SORT(c) sort((c).begin(),(c).end())
#define ALL(a) (a).begin(),(a).end()

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);

  int n;
  vector<int> s(n);
  int total;
  REP(i, n) {
    int tmp;
    cin >> tmp;
    total += tmp;
  }

  if(tmp % 10 == 0) {
    cout << 0 << endl;
  } else {
    cout << total << endl;
  }

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:6: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   31 |   if(tmp % 10 == 0) {
      |      ^~~
      |      tm
Language: C++

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

int main() {
  int n,m10,other,min;
  cin>>n;
  vector<int> a(n);
  n10=other=0;
  min=10000;
  for(int i=0;i<n;i++){
    cin>>a[i];
    if(a[i]%10==0)m10+=a[i];
    else{
      other+=a[i];
      if(a[i]<min)min=a[i];
    }
  }
  if(other%10==0)other-=min;
  cout<<m10+other<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'n10' was not declared in this scope; did you mean 'm10'?
    8 |   n10=other=0;
      |   ^~~
      |   m10
Language: C++

#include <iostream>
#include <numeric>
#include <string>
#include <algorithm>
#include <vector>
#include <cstdlib>
#include <cmath>
#include <utility>
#include <functional>

#define repd(i,a,b); for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
#define ll long long int
 
 
using namespace std;
int main() {
 int n; cin >> n;
 int s[n];
 int sum = 0;
 bool chk = true;
  rep(i,n){
   cin >> s[i];
   if(s[i]%10 != 0){
     chk = false;
   sum += s[i];
 }
 if(chk){
   cout << 0;
 }
 if ( sum % 10 != 0){
   cout << sum;
   exit(0);
 }
 rep(j,n){
   if (s[j]%10 != 0){
     cout << sum - s[j];
     exit(0);
   }
 }
   
 
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:44:2: error: expected '}' at end of input
   44 | }
      |  ^
a.cc:17:12: note: to match this '{'
   17 | int main() {
      |            ^
Language: C++

#include <iostream>
#include <numeric>
#include <string>
#include <algorithm>
#include <vector>
#include <cstdlib>
#include <cmath>
#include <utility>
#include <functional>

#define repd(i,a,b); for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
#define ll long long int
 
 
using namespace std;
int main() {
 int n; cin >> n;
 int s[n];
 int sum = 0;
 bool chk == true;
  rep(i,n){
   cin >> s[i];
   if(s[i]%10 != 0){
     chk = false;
   sum += s[i];
 }
 if(chk){
   cout << 0;
 }
 if ( sum % 10 != 0){
   cout << sum;
   exit(0);
 }
 rep(j,n){
   if (s[j]%10 != 0){
     cout << sum - s[j];
     exit(0);
   }
 }
   
 
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:11: error: expected initializer before '==' token
   21 |  bool chk == true;
      |           ^~
a.cc:25:6: error: 'chk' was not declared in this scope
   25 |      chk = false;
      |      ^~~
a.cc:28:5: error: 'chk' was not declared in this scope
   28 |  if(chk){
      |     ^~~
a.cc:44:2: error: expected '}' at end of input
   44 | }
      |  ^
a.cc:17:12: note: to match this '{'
   17 | int main() {
      |            ^
Language: C++

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

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

  int s[n];
  int res = 0;
  bool tf = false;
  int not10 = 0;
  for(int i=0;i<n;++i)
    cin >> s[i];

  sort(s,s+n);

  for(int i=0;i<n;++i)
  {
    res += s[i];
    if(tf == false && s[i]%10 != 0)
    {
      not10 = s[i];
      tf = true;
    }
  }

  if(res%10 == 0)
  {
    if(tf == true) res -= not10;
    else res = 0;
  }

  cout << res << endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:36:23: error: expected '}' at end of input
   36 |   cout << res << endl;
      |                       ^
a.cc:7:1: note: to match this '{'
    7 | {
      | ^
Language: Java

import java.util.Arrays;

public class AtCoder {
    private static java.util.Scanner scanner = new java.util.Scanner(System.in);

    public static void main(String[] args) {
        int n = scanner.nextInt(), a[] = new int[n], sum = 0;
        for (int i = 0; i < n; i++)
            sum += a[i] = scanner.nextInt();
        if (sum % 10 == 0)
            sum -= Arrays.stream(a)
                    .filter(i -> i % 10 != 0)
                    .min()
                    .orElse(0);
        System.out.println(sum % 10 == 0 ? 0 : sum);
    }
}

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

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

int main(void){
  int n;
  cin >> n;
  int s[n];
  for(int i = 0; i < n; i++) cin >> s[i];
  sort(s, s + n);
  int ans = 0;
  for(int i = 0; i < n; i++) ans += s[i];
  if(ans % 10 != 0) {
    cout << ans << endl;
    return 0;
  }
  int temp = -1;
  for(int i = 0; i < n; i++){
    if(s[i] % 10 != 0){
      temp = s[i];
      break;
    }
  }
  if(temp != -1) {
    cout << ans - temp << endl;
    return 0;
  }
  cout << "0" << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   10 |   sort(s, s + n);
      |   ^~~~
      |   short
Language: C++

#include <bits/stdc++.h>

using namespace std;


int main(){
 int n;
  cin>>n;
  
 int s[n];
  for(int i=0;i<n;i++){
    cin>>s[i];}
  sort(s,s+n);
  
  int max=0;
  for(int i=0,i<n;i++){
    max+=s[i];}
  
  int q=99999;
  
  if(max%10==0){
    
  for(int j=0;j<n;j++){
  if(s[j]%10!=0){
    q=j;
    break;}
  }
    if(q==99999) cout<<0<<endl;
    else cout<<max-s[q]<<endl;}
  else cout<<max<<endl;
  
     
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:16: error: expected ';' before '<' token
   16 |   for(int i=0,i<n;i++){
      |                ^
      |                ;
a.cc:16:16: error: expected primary-expression before '<' token
Language: C++

#include<iostream>
#include<math.h>

using namespace std;

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

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

    sort(s,s+n);
    if(sum%10 == 0){
        for(int i=0;i<n;i++){
            if(s[i]%10==0)break;
            else sum -= s[i];
        }
    }
    if(sum%10 == 0)cout << "0" << endl;
    else cout << sum << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   17 |     sort(s,s+n);
      |     ^~~~
      |     sqrt
Language: C++

#include <bits/stdc++.h>
#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
#define int long long
typedef long long ll;
using namespace std;
const int MOD = 1000000007;
const int INF = 1010000000;
const double EPS = 1e-10;
const pair<int,int> fd[] = {make_pair(1,0),make_pair(-1,0),make_pair(0,1),make_pair(0,-1)}; 


signed main(){
  int n;cin>>n;int mint = INF, ans = 0;
  rep(i,n){
    int s;cin>>s;
    ans += s;
    if(mint > s && s % 10 != 0)mint = s;
  }
  cout << max(0, (ans % 10 ? ans : ans - mint)) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:14: error: no matching function for call to 'max(int, long long int)'
   20 |   cout << max(0, (ans % 10 ? ans : ans - mint)) << endl;
      |           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:20:14: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   20 |   cout << max(0, (ans % 10 ? ans : ans - mint)) << endl;
      |           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:20:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   20 |   cout << max(0, (ans % 10 ? ans : ans - mint)) << endl;
      |           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
using namespace std;
typedef long long ll;
const int INF = 1000100000;
#define rep(i,n) for(int i=0;i<n;++i)

int main(){
  ll n;
  cin >>n;
  int s[n];
  int ans=0;
  rep(i,n){
    cin >> s[i];
    ans+=s[i];
  }
  sort(s,s+n);
  if(ans%10!=0)cout << ans << endl;
  else{
    int hiku=0;
    rep(i,n){
      if(s[i]%10!=0){
        hiku=s[i];
        break;
      }
    }
    if(hiku==0)ans=0;
    else ans-=hiku;
    cout << ans << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   16 |   sort(s,s+n);
      |   ^~~~
      |   short
Language: C++

N=int(input())
s=[int(input()) for i in range(N)]
ans=sum(s)
s.sort()
if ans%10!=0:
    print(ans)
else:
    for i in range(N):
        if(ans-s[i])%10!=0:
            ans-=s[i]
            break
    if ans%10==0:
        print(0)
    else:
        print(ans)

Compiler output:
a.cc:1:1: error: 'N' does not name a type
    1 | N=int(input())
      | ^
Language: C++

n=int(input())
s=[int(input()) for i in range(n)]
if sum(s)%10!=0:
  print(sum(s))
else:
  l=[]
  for j in range(n):
    if s[j]%10!=0:
      l.append(s[j])
  if len(l)==0:
    print(0)
  else:
    print(sum(s)-min(l))

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n=int(input())
      | ^
Language: C++

import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		new Main().execute();
	}

	public void execute() {
		Scanner sc = new Scanner(System.in);
		final int N = sc.nextInt();

		int[] score = new int[N];
		int grandTotal = 0;
		for (int i = 0; i < N; i++) {
			score[i] = sc.nextInt();
			grandTotal += score[i];
		}

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

		System.out.println(0);
		sc.close();
	}

}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Arrays;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.util.Scanner;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
    4 | public class Main {
      | ^~~~~~
Language: C++

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

int main(){
  int n,array[100],ans=0;
  vector<int> not10;
  cin>>n;
  for(int i=0;i<n;i++){
    cin>>array[i];
    if(array[i]%10){
      not10.push_back(array[i]);
    }
    ans+=array[i];
  }
  if(ans%10){
    cout<<ans<<enbdl;
    return 0;
  }
  if(not10.size()==0){
    cout<<0<<endl;
    return 0;
  }
  sort(not10.begin(),not10.end());
  cout<<ans-not10[0]<<endl;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:16:16: error: 'enbdl' was not declared in this scope
   16 |     cout<<ans<<enbdl;
      |                ^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,sum=0;cin>>n;
  vector<int> s(n);
  for(int i=0;i<n;i++){
    cin>>s[i];
    sum+=s[i];
  }
  sort(s.begin(),s,end());
  if(sum%10==0){
    for(int i=0;i<n;i++){
      sum-=s[i];
      if(sum%10!=0) break;
      sum+=s[i];
    }
  }
  cout<<sum<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:23: error: no matching function for call to 'end()'
   10 |   sort(s.begin(),s,end());
      |                    ~~~^~
In file included from /usr/include/c++/14/bits/algorithmfwd.h:39,
                 from /usr/include/c++/14/bits/stl_algo.h:59,
                 from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/initializer_list:99:5: note: candidate: 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
   99 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
/usr/include/c++/14/initializer_list:99:5: note:   candidate expects 1 argument, 0 provided
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/range_access.h:74:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
/usr/include/c++/14/bits/range_access.h:74:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/range_access.h:85:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/usr/include/c++/14/bits/range_access.h:85:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/range_access.h:106:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/usr/include/c++/14/bits/range_access.h:106:5: note:   candidate expects 1 argument, 0 provided
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166:
/usr/include/c++/14/valarray:1249:5: note: candidate: 'template<class _Tp> _Tp* std::end(valarray<_Tp>&)'
 1249 |     end(valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/valarray:1249:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/valarray:1265:5: note: candidate: 'template<class _Tp> const _Tp* std::end(const valarray<_Tp>&)'
 1265 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/valarray:1265:5: note:   candidate expects 1 argument, 0 provided
Language: C++

#include<iostream>
#include <algorithm>
#include<string>
#include <bitset>
#include <vector>
#include <functional>
#include <climits>
#include <iomanip>
#include <utility>
#include <stack>
using namespace std;
using ll = long long;
int main()
{
	ll a, b, c = 0, d;
	cin >> a;
	ll s[1000];
	for (int i = 0; i < a; i++)
	{
		cin >> s[i];
	}
	sort(s, s + a);


	for (int i = 0; i < a; i++)
	{
		c += c[i];
	}
	if (c % 10 == 0)
	{
		for (int i = 0; i < a; i++)
		{
			if (s[i]%10!=0)
			{
				c -= s[i];
				cout << c << endl;
				return 0;
			}
		}
		cout << 0 << endl;
		return 0;
	}


	cout << c << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:23: error: invalid types 'll {aka long long int}[int]' for array subscript
   27 |                 c += c[i];
      |                       ^
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <cmath>

using namespace std;

int main(){

	int N;
	std::vector<int> si;

	cin >> N;
	int sum = 0;
	for(int i=0; i<N; i++){
		int temp;
		cin >> temp;
		si.push_back(temp);
		sum += temp;
	}

	if(sum%10 != 0){
		cout << sum << endl;
	}else{
		bool f=true;
		for(int s:si){
			if(f && s%10 == 0){
				f=true;
			}else{
				f=false;
				break;
			}
		}
		if(f){
			puts("0");
		}else{
			sort(si.begin(),si.end());
			int min = 0;
			for(int s:si){
				if(s%10!=0){
					min = s;
					break;
				}
			}
			cout << sum-min << endl;
		}
	}

	

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:25: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   38 |                         sort(si.begin(),si.end());
      |                         ^~~~
      |                         sqrt
Language: Java

import java.util.Arrays;
import java.util.Scanner;

public class Bugged {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] s = new int[n];
        int total = 0;
        for (int i = 0 ; i < n ; i++) {
            s[i] = sc.nextInt();
            total += s[i];
        }
        Arrays.sort(s);

        if (total % 10 != 0) {
            System.out.println(total);
        } else {
            for (int i = 0 ; i < n ; i++) {
                int temp = total - s[i];
                if (temp % 10 != 0 ) {
                    System.out.println(temp);
                    return;
                }
            }
            System.out.println(0);
        }

    }

}

Compiler output:
Main.java:4: error: class Bugged is public, should be declared in a file named Bugged.java
public class Bugged {
       ^
1 error
Language: C++

#include <iostream>
#include <bits/stdc++.h>
using namespace std;
int dp[150][150];
int num[150];
bool cmp(int a,int b)
{
    return a < b;
}
/*
3
5
10
15
*/
int main()
{
    int n;
    cin >> n;
    for(int i = 0; i < n; i++)
    {
        cin >> num[i];
    }
    sort(num,num+n,cmp);
    int sum = 0;
    for(int i = 0;i < n;i++)
        sum += num[i];
    if(sum%10 != 0)
        cout << sum <<endl;
    else
    {
        int pos = 0;
        while(sum%10 =  = 0)
        {
            sum -= num[pos];
            pos++;
        }
        cout << sum << endl;
    }
    //cout << ans <<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:25: error: expected primary-expression before '=' token
   33 |         while(sum%10 =  = 0)
      |                         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define rep(i,b) FOR(i,0,b)
#define INF mugen
#define dump(x) cerr<<#x<<"="<<x<<endl
#define all(a) (a).begin(),(a).end()
typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<vii> viii;
typedef pair<int,int> P;
template <class T> void chmin(T & a, T const & b) { if (b < a) a = b; }
inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; }
using ll = long long;
const ll mod = LLONG_MAX;

bool dp[112][11234]
int s[110];
int main(){
  int n;
  cin>>n;
  rep(i,n)cin>>s[i];

  dp[0][0]=1;
  int ans=0;
  rep(i,n){
    rep(j,11234){
      dp[i+1][j]|=dp[i][j];
      if(j>s[i]){
        if(dp[i][j-s[i]]){
          dp[i+1][j]=true;
          if(j%10!=0)ans=max(ans,j);
        }
      }
    }
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc:18:1: error: expected initializer before 'int'
   18 | int s[110];
      | ^~~
a.cc: In function 'int main()':
a.cc:22:16: error: 's' was not declared in this scope
   22 |   rep(i,n)cin>>s[i];
      |                ^
a.cc:24:3: error: 'dp' was not declared in this scope; did you mean 'dup'?
   24 |   dp[0][0]=1;
      |   ^~
      |   dup
a.cc:29:12: error: 's' was not declared in this scope
   29 |       if(j>s[i]){
      |            ^
Language: C++

int main(){
                                                                                                
   
    int n, i;

    int m = 0;
         
    cin >> n;

    vector<int> s(n);

   
    for( i = 0 ; i < n ; i = i + 1 ){

         cin >> s.at(i);

         m = m + s.at(i);

         }

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

    
    for( i = 0 ; i < n ; i = i + 1 ){

         if( m % 10 != 0 ) break;

         if( ( m - s.at(i) ) % 10 != 0 ){

             m = m - s.at(i);

             }

         }

    if( m % 10 == 0 ) m = 0;

    cout << m << endl;


    return 0;
                                                          
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope
    8 |     cin >> n;
      |     ^~~
a.cc:10:5: error: 'vector' was not declared in this scope
   10 |     vector<int> s(n);
      |     ^~~~~~
a.cc:10:12: error: expected primary-expression before 'int'
   10 |     vector<int> s(n);
      |            ^~~
a.cc:15:17: error: 's' was not declared in this scope
   15 |          cin >> s.at(i);
      |                 ^
a.cc:22:11: error: 's' was not declared in this scope
   22 |     sort( s.begin(), s.end() );
      |           ^
a.cc:22:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   22 |     sort( s.begin(), s.end() );
      |     ^~~~
      |     short
a.cc:39:5: error: 'cout' was not declared in this scope
   39 |     cout << m << endl;
      |     ^~~~
a.cc:39:18: error: 'endl' was not declared in this scope
   39 |     cout << m << endl;
      |                  ^~~~
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<cmath>
#include<climits>
#include<map>
#include<set>
#include<queue>
#include<stack>
#include<bitset>
#include<iomanip>
using namespace std;

#define rep(i,j,n) for(int i=(j);i<(n);i++)
#define rep2(i,j,n) for(int i=(j);i<=(n);i++)
#define all(i) i.begin(),i.end()

typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<string> vs;
typedef vector<vector<string>> vvs;
typedef pair<int, int> pi;

int main() {
	int n;
	cin >> n;
	vi s(n);
	int a = 0;
	rep(i, 0, n) {
		cin >> s[i];
		a += s[i];
	}
	vi dp(n + 1);
	dp[0] = 0;
	sort(all(s));
	vi ss(s);
	reverse(all(ss));
	rep(i, 0, n) {
		int sum = dp[i] + ss[i];
		if (sum % 10 == 0) {
			sum = 0;
		}
		dp[i + 1] = max(dp[i], sum);
	}
	vi dp1(n + 1);
	dp1[0] = 0;
	rep(i, 0, n) {
		int sum = a - s[i];
		if (sum % 10 == 0) {
			sum = 0;
		}
		dp1[i + 1] = max(dp1[i], sum);
	}
	cout << max(dp[n], dp1[n], a) << endl;
	return 0;
}


Compiler output:
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:55:13:   required from here
   55 |         cout << max(dp[n], dp1[n], a) << endl;
      |                 ~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

// ------------------------------------
// Date:2018/ 3/25
// Problem:C - Bugged d.cpp
//
// ------------------------------------

#include <bits/stdc++.h>

using namespace std;

#define EACH(i,a) for (auto& i : a)
#define FOR(i,a,b) for(int i=(int)a;i<(int)b;++i)
#define RFOR(i,a,b) for(int i=(int)b-1;i>=(int)a;--i)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define ALL(a) (a).begin(),(a).end()
#define debug(x) cerr << #x << ":" << x << endl;
#define OK(ok) cout << (ok ? "Yes" : "No") << endl;
typedef long long ll;

void CINT(){}
template <class Head,class... Tail>
void CINT(Head&& head,Tail&&... tail) {
  cin >> head; CINT(move(tail)...);
}
#define CIN(...) int __VA_ARGS__;CINT(__VA_ARGS__)
#define LCIN(...) ll __VA_ARGS__;CINT(__VA_ARGS__)
#define SCIN(...) string __VA_ARGS__;CINT(__VA_ARGS__)

static const int MOD = 1e9 + 7;
static const int MAX_N = 1;

int N;

int main()
{
  scanf("%d", &N);
  vector< int > s(N);
  REP(i, N) scanf("%d", &s[i]);
  
  vector< int > ans;
  int sum;
  for(unsigned ll i = 0ll; i < 1 << N; ++i) {
    sum = 0;
    REP(j, N) {
      if ((i >> j) & 1) {
	sum += s[j];
      }     
    }
    ans.emplace_back(sum);
  }

  int output;
  sort(ALL(ans), greater< int >());
  REP(i, ans.size()) {
    if (ans[i] % 10 == 0) continue;
    output = ans[i];
    break;
  }
  
  cout << output << endl;
  
  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:43:18: error: expected ';' before 'i'
   43 |   for(unsigned ll i = 0ll; i < 1 << N; ++i) {
      |                  ^~
      |                  ;
a.cc:43:19: error: 'i' was not declared in this scope
   43 |   for(unsigned ll i = 0ll; i < 1 << N; ++i) {
      |                   ^
a.cc:43:38: error: expected ')' before ';' token
   43 |   for(unsigned ll i = 0ll; i < 1 << N; ++i) {
      |      ~                               ^
      |                                      )
a.cc:43:42: error: 'i' was not declared in this scope
   43 |   for(unsigned ll i = 0ll; i < 1 << N; ++i) {
      |                                          ^
Language: C++

#include <iostream>

using namespace std;

int main(){
  int N;
  cin >> N;
  int s[N],i,ans=0;
  for(i=0;i<N;i++){
    cin >> s[i];
    ans+=s[i];
  }
  if(ans%10!=0){
    cout << ans << endl;
    return 0;
  }
  sort(s,s+N);
  for(i=0;i<N;i++)if(s[i]%10 != 0)break;
  if(i==N){
    cout << "0" << endl;
    return 0;
  }else{
    cout << ans-s[i] << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   17 |   sort(s,s+N);
      |   ^~~~
      |   short
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:31:29: error: invalid types 'int[int]' for array subscript
   31 |                         if(a[i]%10!=0){
      |                             ^
Language: C

#include <stdio.h>
#include <stdlib.h>
#include "myfunc.h"

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

  int score = 0;
  qsort(s, N, sizeof(int), comp_up);
  for(int i = 0; i < N; i++){
    score += s[i];
  }
  if(score % 10 != 0){
    printf("%d\n", score);
  }else{
    int i;
    for(i = 0; i < N; i++){
      if(s[i] % 10 != 0){
        score -= s[i];
        printf("%d\n", score);
        return 0;
      }
    }
    if(i >= N - 1) printf("%d\n", 0);
  }
  return 0;
}


Compiler output:
main.c:3:10: fatal error: myfunc.h: No such file or directory
    3 | #include "myfunc.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

    #include <stdio.h>
     
    int main()
    {
    	//変数の宣言と初期化
        int n,flg1=0 ;
        do{
        flg1=scanf("%d",&n);
        }while(1>n||n>100);
     
    	int t[n];	
    	int score = 0;
    	int x;
    	//iに0を代入、iがnになるまで、iに1を足す
    	for(x=0; x<n ;x++)
    	{
    		//int t[n];
    		int flg2 = 0;
    		do{
    		flg2 = scanf("%d",&t[x]);
                }while(1>t[x]||t[x]>100);
                
    		score = score + t[x];
    		//printf("score=");
    		//printf("%d\n",score);
    	}
            int i, j, tmp;
            for (i=0; i<n; i++) {
               for (j=i+1; j<n; j++) {
                  if (t[i] > t[j]) {
                     tmp =  t[i];
                     t[i] = t[j];
                     t[j] = tmp;
                  }
               }
            }
            /*printf("昇順ソートした数値\n");
            for (i=0; i<n; i++)
            printf("%d\n", t[i]);*/
            
   /*         int y;
            for (y=0; y<n; y++){
               if(score % 10 == 0){
                  score = score - t[y-1];
                  //printf("score1=");
    	      //printf("%d\n",score);          
    	   }
    	}*/
    	
    	if(y=n, score % 10 == 0){
    	   score = 0;
    	   }
    	
    	//printf("%d\n",n);
    	//printf("%d\n",y);	
    	printf("%d\n",score);
    	
            return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:50:12: error: 'y' was not declared in this scope
   50 |         if(y=n, score % 10 == 0){
      |            ^
Language: C++

#include <stdio.h>

int main()
{
	//変数の宣言と初期化
	int n = 0;
	//n個分のint型配列を用意
	scanf("%d",&n);
        
        if (n > 100){
           return;
        }
        
	int t[n];	
	int score = 0;
	int x;
	//iに0を代入、iがnになるまで、iに1を足す
	for(x=0; x<n ;x++)
	{
		scanf("%d",&t[x]);

		score = score + t[x];
		//printf("score=");
		//printf("%d\n",score);
	}
        int i, j, tmp;
        for (i=0; i<n; i++) {
           for (j=i+1; j<n; j++) {
              if (t[i] > t[j]) {
                 tmp =  t[i];
                 t[i] = t[j];
                 t[j] = tmp;
              }
           }
        }
        /*printf("昇順ソートした数値\n");
        for (i=0; i<n; i++)
        printf("%d\n", t[i]);*/
        
        int y;
        for (y=0; y<n; y++){
           if(score % 10 == 0){
              score = score - t[y-1];
              //printf("score1=");
	      //printf("%d\n",score);          
	   }
	}
	
	if(y=n, score % 10 == 0){
	   score = 0;
	   }
	
	//printf("%d\n",n);
	//printf("%d\n",y);	
	printf("%d\n",score);
	
        return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: return-statement with no value, in function returning 'int' [-fpermissive]
   11 |            return;
      |            ^~~~~~
Language: C++

#include <iostream>
using namespace std;

int min(int a, int b) {

	if (a < b)return a;
	else return b;

}
int main() {

	int N;
	int s[110];
	bool check_not10 = false;
	int all_sum = 0, min_not10 = INT_MAX;

	cin >> N;
	for (int i = 1; i <= N; i++) {

		cin >> s[i];
		all_sum += s[i];
		if (s[i] % 10 != 0) {

			min_not10 = min(s[i], min_not10);
			check_not10 = true;

		}

	}

	if (all_sum % 10 == 0) {

		if (check_not10)cout << all_sum - min_not10 << endl;
		else cout << 0 << endl;

	}
	else cout << all_sum << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:38: error: 'INT_MAX' was not declared in this scope
   15 |         int all_sum = 0, min_not10 = INT_MAX;
      |                                      ^~~~~~~
a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    1 | #include <iostream>
  +++ |+#include <climits>
    2 | using namespace std;
Language: C

#include <stdio.h>
#include <string.h>
int main(){
	int Sum=0;
	int nowMin=10000;
	int tmp,Num,i;
	scanf("%d",&Num);
	for(i=0;i<Num;i++){
		scanf("%d",&tmp);//値の取得
		if(nowMin>tmp && nowMin%10!=0)nowMin =tmp;
		Sum+=tmp;
	}
	if(nowMin==10000){
		nowMin=0;
		printf("0");
		return 0;
	}
	if(Sum%10==0){
		Sum-=nowMin;
	}
	if(Sum%10==0){
		printf("0");
	}else{
		printf("%d",Sum);
	}
	return 0;
	

}
//if()
//もし、下一桁が0になってしまう場合は、なるべく小さい0ではないものを引く

/*なるべく小さい下1ｹﾀ0

Compiler output:
main.c:33:1: error: unterminated comment
   33 | /*なるべく小さい下1ｹﾀ0
      | ^
Language: Java

import java.util.Scanner;
import java.util.Arrays;


public class a{
	public static void main(String [] args){
		int sum=0,k,pos;
		int array[] = new int[100];
		
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		for(int i=0;i<n;i++){
			array[i] = sc.nextInt();
			sum += array[i];
		}
		pos = n-1;
		for(int i=0;i<n;i++){
			for(int j=0;j<pos;j++){
				if(array[j] > array[j + 1]){
					k = array[j];
					array[j] = array[j+1];
					array[j+1] = k;
				}
			}
			pos--;
		}
		
		for(int i=0;i<n && (sum % 10) == 0;i++)
			sum -= array[i];

		System.out.println(sum);
	}

}

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

N = int(input())
s = []
for _ in range(N):
    s.append(int(input()))

if sum(s) % 10 != 0:
    print(sum(s))

else:
    min_s = 0
    sorted_s = sorted(s, reverse=True)
    for ss in sorted_s:
        if ss % 10 != 0:
            min_s = ss

    if min_s == 0:
        print(0)
    else:
        print(sum(s) - min_s)


Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | N = int(input())
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'N' [-Wimplicit-int]
main.c:1:5: error: expected expression before 'int'
    1 | N = int(input())
      |     ^~~
Language: C++

# -*- coding:utf-8 -*-
import sys

N = int(input())
Sn = sorted([int(input()) for i in range(N)])
total = sum(Sn)
if total % 10 != 0:
    print(total)
    sys.exit()
else:
    i = 0
    while True:
        total -= Sn[i]
        if total % 10 != 0:
            print(total)
            sys.exit()

print(0)

Compiler output:
a.cc:1:3: error: invalid preprocessing directive #-
    1 | # -*- coding:utf-8 -*-
      |   ^
a.cc:2:1: error: 'import' does not name a type
    2 | import sys
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
Language: Java

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

public class C {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int[] point = new int[n];
		List<Integer> num = new ArrayList<>();
		int sum = 0;
		for (int i = 0; i < n; i++) {
			point[i] = scanner.nextInt();
			sum += point[i];
			if (point[i] % 10 != 0) {
				num.add(point[i]);
			}
		}
		if (sum % 10 != 0) {
			System.out.println(sum);
		} else {
			if (num.size() == 0) {
				System.out.println(0);
			} else {
				int min = 101;
				for (Integer i : num) {
					if (i < min) {
						min = i;
					}
				}
				System.out.println(sum-min);
			}
		}
		scanner.close();
	}
}


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

#include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <algorithm>
#include <cmath>
#include <string>
#include <cstring>
#include <map>
#include <set>
#include <bitset>
#include <sstream>
#include <cstdlib>
#include <unordered_map>
#include <unordered_set>
#include <list>
using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
typedef vector<vector<int>> vvi;

int main() {
    int n;
    cin >> n;
    int sum = 0, mini = INT_MAX;
    for (int i = 0; i < n; ++i) {
        int x;
        cin >> x;
        sum += x;
        if (x % 10) {
            mini = min(mini, x);
        }
    }
    if (sum % 10) {
        cout << sum;
    } else if (mini != INT_MAX) {
        cout << sum - mini;
    } else {
        cout << 0;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:25: error: 'INT_MAX' was not declared in this scope
   26 |     int sum = 0, mini = INT_MAX;
      |                         ^~~~~~~
a.cc:17:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   16 | #include <list>
  +++ |+#include <climits>
   17 | using namespace std;
Language: C++

#include<iostream>	// 入出力
#include<math.h>	// 数学の関数
#include<vector>	// 配列
#include<string>	// 文字列
#include<map>		// 連想配列
#include<stack>		// スタック
#include<queue>		// キュー

using namespace std;


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

	vector<int> s(n);
	int value = 0;

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

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

	if (value % 10 == 0)
	{
		for (int i = 0; i < n; ++i) {
			if (s[i] % 10 == 0) {
				continue;
			}
			cout << value - s[i] << endl;
			return 0;
		}
		cout << 0 << endl;
		return 0;
	}

	cout << value << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   25 |         sort(s.begin(), s.end());
      |         ^~~~
      |         sqrt
Language: C

#include <stdio.h>
#include <string.h>


int main(void){
    int i,N,sum=0,min=101;
    int score[100];
    
    scanf("%d",&N);
    
    for( i = 0; i < N; i++ ){
        scanf("%d",&score[i]);
        sum += score[i];
        if( score[i] < min && score[i] % 10 != 0){
            min = s[i];
        }
    }
    
    if( sum % 10 != 0 ){
        printf("%d",sum);
    }
    if( min == 101 ){
        printf("0");
    }
    else if( sum % 10 ==0 ){
        printf("%d\n",sum-min);
    }
    
    
    
    
    
    
     return 0;
}

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

#include <stdio.h>

int main(){
    
    int N,s[100]={},sum,min=100;
    
    scanf("%d",&N);
    
    for(i=0;i<N;i++){
        scanf("%d",&s[i]);
        sum+= s[i];
        if(s[i] % 10 != 0 && min > s[i] )min=s[i];
    }
    
    if(sum % 10 != 0)printf("%d",sum);
    else if(sum % 10 == 0 && min % 10 != 0)printf("%d",sum-min);
    else printf("0\n");
    
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:9: error: 'i' undeclared (first use in this function)
    9 |     for(i=0;i<N;i++){
      |         ^
main.c:9:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main(void){
int N;
std::cin >> N;
std::vector<int> vec(N);
for(int i = 0; i < N; ++i){
std::cin >> vec[i];
}

int sum = std::accumulate(vec.begin(), vec.end(), 0);
if(sum % 10 == 0){
std::sort(vec.begin(), vec.end());
for(auto i : vec){
 if(i % 10 == 0){ continue; }
 else{ sum -= i; break; }
}
}
std::cout << sum << std::endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:16: error: 'accumulate' is not a member of 'std'
   13 | int sum = std::accumulate(vec.begin(), vec.end(), 0);
      |                ^~~~~~~~~~
Language: C++

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

int main(void){
int N;
std::cin >> N;
std::vector<int> vec(N);
for(int i = 0; i < N; ++i){
std::cin >> vec[i];
}

int sum = std::accumurate(vec.begin(), vec.end(), 0);
if(sum % 10 == 0){
std::sort(vec.begin(), vec.end());
for(auto i : vec){
 if(i % 10 == 0){ continue; }
 else{ sum -i; break; }
}
}
std::cout << sum << std::endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:16: error: 'accumurate' is not a member of 'std'
   13 | int sum = std::accumurate(vec.begin(), vec.end(), 0);
      |                ^~~~~~~~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){

int a,b[100],c,min;
min=1000;
c=0;
cin>>a;
	for(int i=0;i<a;i++){
		cin>>b[i];
		c=c+b[i];
	}
	if(c%10>0){
		cout<<c<<endl;
	}
		for(int k=0;k<a;k++){
			if(min>a[k] && a[k]%10>0){
				min=a[k];
			}
		}
	if(min==0){
	cout<<0<<endl;
	}
	cout<<c-min<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:33: error: invalid types 'int[int]' for array subscript
   18 |                         if(min>a[k] && a[k]%10>0){
      |                                 ^
a.cc:18:41: error: invalid types 'int[int]' for array subscript
   18 |                         if(min>a[k] && a[k]%10>0){
      |                                         ^
a.cc:19:38: error: invalid types 'int[int]' for array subscript
   19 |                                 min=a[k];
      |                                      ^