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

#include<stdio.h>
#include<string.h>
int main(){
	int N;
	int harshad = 0;
	char N_str[10];
	scanf("%s", &N_str);
 	
	N = atoi(&N_str);

	for(int i = 0; i < strlen(N_str); i++){
		harshad += N_str[i] - '0';
	}
	if(N % harshad == 0) {
	printf("Yes\n");
	} else {
	printf("No\n");
	{
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:13: error: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
    9 |         N = atoi(&N_str);
      |             ^~~~
main.c:20:1: error: expected declaration or statement at end of input
   20 | }
      | ^
main.c:20:1: error: expected declaration or statement at end of input
Language: C++

#include <iostream>
using namespace std;

int main()
{
	int n,s=0,p,i;
    cin>>n;
    p=n;
	do{
		s=s+p%10;
		p=p/10;
	} while(p!=0);
	
	if(n%s=0) cout<<"Yes"<<endl;
	else cout<<"No"<<endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: lvalue required as left operand of assignment
   14 |         if(n%s=0) cout<<"Yes"<<endl;
      |            ~^~
Language: C

#include <stdio.h>
#include <string.h>
int main() {
    char[10] N_str;
    scanf("%d", &N_str);
    int N = atoi(N_str);
    int harshad = 0;
    for(int i = 0; i < strlen(N_str); i++) {
        harshad += atoi(N_str[i]);
    }
    if(harshad == N) {
        printf("Yes\n");
    } else {
        printf("No\n");
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:9: error: expected identifier or '(' before '[' token
    4 |     char[10] N_str;
      |         ^
main.c:5:18: error: 'N_str' undeclared (first use in this function)
    5 |     scanf("%d", &N_str);
      |                  ^~~~~
main.c:5:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:13: error: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
    6 |     int N = atoi(N_str);
      |             ^~~~
Language: C++

int main()
{
	int n, m, place = 1, sum = 0, i = 0;
	cin >> n;
	m = n;
	for (; m != 0; i++)
	{
		sum += m % 10;
		m = (m - m % 10) / 10;
	}
	if (n%sum == 0) cout << "Yes\n";
	else cout<< "No\n";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         cin >> n;
      |         ^~~
a.cc:11:25: error: 'cout' was not declared in this scope
   11 |         if (n%sum == 0) cout << "Yes\n";
      |                         ^~~~
a.cc:12:14: error: 'cout' was not declared in this scope
   12 |         else cout<< "No\n";
      |              ^~~~
Language: C++

#include <iostream>
#include <string.h>
#include <algorithm.h>
string s;

int main(){
	cin >> s;
  	int pos=0;
  	REP(i,0,s.size()) pos+=s[i]-'0';
  	cout << (stoll(s)%pos?"No":"Yes") << endl;
	
  	return 0;
}

Compiler output:
a.cc:3:10: fatal error: algorithm.h: No such file or directory
    3 | #include <algorithm.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

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

int main()
{
    int x;
    cin>>x;
    int p=x,sum=0;
    while (p>0)
    {
        sum+=p%10;
        p/=10;
    }
   if(x%sum==0)
    {
        cout<<"Yes"<<endl;
        return 0;
    }
    else
    {
        cout<<"No"<<endl;
        return 0;
    }
    return 0;
}

Compiler output:
a.cc:1:10: fatal error: bits/stdc++.ch: No such file or directory
    1 | #include <bits/stdc++.ch>
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
Language: C++


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

int f(int n){
  if (n < 10) return n;
  return f(n/10) + n % 10;
}

int main(){
  cin >> n;
  printf("%s\n", (n % f(n) ? "YES" : "NO));
  return 0;
}

Compiler output:
a.cc:12:38: warning: missing terminating " character
   12 |   printf("%s\n", (n % f(n) ? "YES" : "NO));
      |                                      ^
a.cc:12:38: error: missing terminating " character
   12 |   printf("%s\n", (n % f(n) ? "YES" : "NO));
      |                                      ^~~~~~
a.cc: In function 'int main()':
a.cc:11:10: error: 'n' was not declared in this scope; did you mean 'yn'?
   11 |   cin >> n;
      |          ^
      |          yn
a.cc:13:3: error: expected primary-expression before 'return'
   13 |   return 0;
      |   ^~~~~~
a.cc:12:37: error: expected ')' before 'return'
   12 |   printf("%s\n", (n % f(n) ? "YES" : "NO));
      |                  ~                  ^
      |                                     )
   13 |   return 0;
      |   ~~~~~~
Language: C

#include <stdio.h>

int main(){
	int N, y;
	scanf("%d", &N);
	int x8 = N % 10^8;
	if (x8 == N){
		x8 = 0;
	}else{y = N-x8/10^8;}

	int x7 = N % 10^7;
	if (x7 == N){
		x7 = 0;
	}else{y = N-x7/10^7;}
	int x6= N % 10^6;
	if (x6 == N){
		x6 = 0;
	}else{y = N-x6/10^6;}
	int x5 = N % 10^5;
	if (x5 == N){
		x5 = 0;
	}else{y = N-x5/10^5;}
	int x4 = N % 10^4;
	if (x4 == N){
		x4 = 0;
	}else{y = N-x4/10^4;}
	int x3 = N % 10^3;
	if (x3 == N){
		x3 = 0;
	}else{y = N-x3/10^3;}
	int x2 = N % 10^2;
	if (x2 == N){
		x2 = 0;
	}else{y = N-x2/10^2;}
	int x1 = N % 10^1;
	if (x1 == N){
		x1 = 0;
	}else{y = N}
	int ans = y + x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8;
	if (N % ans == 0){
		printf("Yes");
	}else{
		printf("No");
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:38:20: error: expected ';' before '}' token
   38 |         }else{y = N}
      |                    ^
      |                    ;
Language: C

#include <stdio.h>

int main(){
	int N, y;
	scanf("%d", &N);
	int x8 = N % 10^8;
	if (x8 == N){
		x8 = 0;
	}else{y = N-x8/10^8}

	int x7 = N % 10^7;
	if (x7 == N){
		x7 = 0;
	}else{y = N-x7/10^7}
	int x6= N % 10^6;
	if (x6 == N){
		x6 = 0;
	}else{y = N-x6/10^6}
	int x5 = N % 10^5;
	if (x5 == N){
		x5 = 0;
	}else{y = N-x5/10^5}
	int x4 = N % 10^4;
	if (x4 == N){
		x4 = 0;
	}else{y = N-x4/10^4}
	int x3 = N % 10^3;
	if (x3 == N){
		x3 = 0;
	}else{y = N-x3/10^3}
	int x2 = N % 10^2;
	if (x2 == N){
		x2 = 0;
	}else{y = N-x2/10^2}
	int x1 = N % 10^1;
	if (x1 == N){
		x1 = 0;
	}else{y = N-x1/10^1}
	int ans = y + x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8;
	if (N % ans == 0){
		printf("Yes");
	}else{
		printf("No");
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:28: error: expected ';' before '}' token
    9 |         }else{y = N-x8/10^8}
      |                            ^
      |                            ;
main.c:14:28: error: expected ';' before '}' token
   14 |         }else{y = N-x7/10^7}
      |                            ^
      |                            ;
main.c:18:28: error: expected ';' before '}' token
   18 |         }else{y = N-x6/10^6}
      |                            ^
      |                            ;
main.c:22:28: error: expected ';' before '}' token
   22 |         }else{y = N-x5/10^5}
      |                            ^
      |                            ;
main.c:26:28: error: expected ';' before '}' token
   26 |         }else{y = N-x4/10^4}
      |                            ^
      |                            ;
main.c:30:28: error: expected ';' before '}' token
   30 |         }else{y = N-x3/10^3}
      |                            ^
      |                            ;
main.c:34:28: error: expected ';' before '}' token
   34 |         }else{y = N-x2/10^2}
      |                            ^
      |                            ;
main.c:38:28: error: expected ';' before '}' token
   38 |         }else{y = N-x1/10^1}
      |                            ^
      |                            ;
Language: C

#include <stdio.h>

int main(){
	int N, y;
	scanf("%d", &N);
	int x8 = N % 10^8;
	if (x8 == N){
		x8 = 0;
	}else {y = N-x8/10^8};

	int x7 = N % 10^7;
	if (x7 == N){
		x7 = 0;
	}else {y = N-x7/10^7};
	int x6= N % 10^6;
	if (x6 == N){
		x6 = 0;
	}else {y = N-x6/10^6};
	int x5 = N % 10^5;
	if (x5 == N){
		x5 = 0;
	}else {y = N-x5/10^5};
	int x4 = N % 10^4;
	if (x4 == N){
		x4 = 0;
	}else {y = N-x4/10^4};
	int x3 = N % 10^3;
	if (x3 == N){
		x3 = 0;
	}else {y = N-x3/10^3};
	int x2 = N % 10^2;
	if (x2 == N){
		x2 = 0;
	}else {y = N-x2/10^2};
	int x1 = N % 10^1;
	if (x1 == N){
		x1 = 0;
	}else {y = N-x1/10^1};
	int ans = y + x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8;
	if (N % ans == 0){
		printf("Yes");
	}else{
		printf("No");
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:29: error: expected ';' before '}' token
    9 |         }else {y = N-x8/10^8};
      |                             ^
      |                             ;
main.c:14:29: error: expected ';' before '}' token
   14 |         }else {y = N-x7/10^7};
      |                             ^
      |                             ;
main.c:18:29: error: expected ';' before '}' token
   18 |         }else {y = N-x6/10^6};
      |                             ^
      |                             ;
main.c:22:29: error: expected ';' before '}' token
   22 |         }else {y = N-x5/10^5};
      |                             ^
      |                             ;
main.c:26:29: error: expected ';' before '}' token
   26 |         }else {y = N-x4/10^4};
      |                             ^
      |                             ;
main.c:30:29: error: expected ';' before '}' token
   30 |         }else {y = N-x3/10^3};
      |                             ^
      |                             ;
main.c:34:29: error: expected ';' before '}' token
   34 |         }else {y = N-x2/10^2};
      |                             ^
      |                             ;
main.c:38:29: error: expected ';' before '}' token
   38 |         }else {y = N-x1/10^1};
      |                             ^
      |                             ;
Language: C

#include <stdio.h>

int main(){
	int N, y;
	scanf("%d", &N);
	int x8 = N % 10^8;
	if (x8 == N){
		x8 = 0;
	}else {y = N-x8/10^8}

	int x7 = N % 10^7;
	if (x7 == N){
		x7 = 0;
	}else {y = N-x7/10^7}
	int x6= N % 10^6;
	if (x6 == N){
		x6 = 0;
	}else {y = N-x6/10^6}
	int x5 = N % 10^5;
	if (x5 == N){
		x5 = 0;
	}else {y = N-x5/10^5}
	int x4 = N % 10^4;
	if (x4 == N){
		x4 = 0;
	}else {y = N-x4/10^4}
	int x3 = N % 10^3;
	if (x3 == N){
		x3 = 0;
	}else {y = N-x3/10^3}
	int x2 = N % 10^2;
	if (x2 == N){
		x2 = 0;
	}else {y = N-x2/10^2}
	int x1 = N % 10^1;
	if (x1 == N){
		x1 = 0;
	}else {y = N-x1/10^1}
	int ans = y + x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8;
	if (N % ans == 0){
		printf("Yes");
	}else{
		printf("No");
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:29: error: expected ';' before '}' token
    9 |         }else {y = N-x8/10^8}
      |                             ^
      |                             ;
main.c:14:29: error: expected ';' before '}' token
   14 |         }else {y = N-x7/10^7}
      |                             ^
      |                             ;
main.c:18:29: error: expected ';' before '}' token
   18 |         }else {y = N-x6/10^6}
      |                             ^
      |                             ;
main.c:22:29: error: expected ';' before '}' token
   22 |         }else {y = N-x5/10^5}
      |                             ^
      |                             ;
main.c:26:29: error: expected ';' before '}' token
   26 |         }else {y = N-x4/10^4}
      |                             ^
      |                             ;
main.c:30:29: error: expected ';' before '}' token
   30 |         }else {y = N-x3/10^3}
      |                             ^
      |                             ;
main.c:34:29: error: expected ';' before '}' token
   34 |         }else {y = N-x2/10^2}
      |                             ^
      |                             ;
main.c:38:29: error: expected ';' before '}' token
   38 |         }else {y = N-x1/10^1}
      |                             ^
      |                             ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
	cin>>n;
	int d_s;
	while (n)
	{
		d_s+=n%10;
		n/=10;
	}
	if(n%d_s==0)
	{
		cout<<"Yes";
	}
	else
	cout<<"No";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:14: error: 'n' was not declared in this scope; did you mean 'yn'?
    5 |         cin>>n;
      |              ^
      |              yn
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int a,s=0;
	cin>>a;
	int b=a;
	while(b)
	{
		sum+=b%10;
		b/=10;
	}
	a%b?cout<<"No":cout<<"Yes";
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'sum' was not declared in this scope
   10 |                 sum+=b%10;
      |                 ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int a,s=0;
	cin>>a;
	int b=a;
	while(b)
	{
		sum+=b%10;
		b/=10;
	}
	cout<<a%b?"No":"Yes"<<endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'sum' was not declared in this scope
   10 |                 sum+=b%10;
      |                 ^~~
a.cc:13:29: error: invalid operands of types 'const char [4]' and '<unresolved overloaded function type>' to binary 'operator<<'
   13 |         cout<<a%b?"No":"Yes"<<endl;
      |                        ~~~~~^~~~~~
Language: Java

import java.util.Scanner;


public class main{

	public static void main(String args[]){

		Scanner scan = new Scanner(System.in);

		int N =  scan.nextInt();
		int M = N;
		int keta = String.valueOf(N).length();		//桁数が返されるは"+
		int m = keta;
		int sum = 0;			//合計値


		for(int j = 0;j < m;j++){
			int waru = 1;
			if(keta != 0){
				for(int i = keta-1;i > 0;i--){
					waru *= 10;
					
				}
			}
			
			sum += N/waru;
			
			keta--;
			N -= (N/waru)*waru;
			

		}
		
		if(M%sum == 0){
			System.out.println("Yes");

		}else{
			System.out.println("NO");
		}

	}
}

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

#include <stdio.h>
int main()
{
   int x,sum = 0, n;
   scanf("%d", &N);
   n = x;
   while (x!= 0)
    {
        sum += x%10;
        x /=10;
    }
    if ((n%sum) == 0)
    printf("Yes");
    else
    printf("No");
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:17: error: 'N' was not declared in this scope
    5 |    scanf("%d", &N);
      |                 ^
Language: Java

import java.util.*;

public class Main12{
    public static void main(String[] args){
        
        Scanner scan = new Scanner(System.in);
        String N = scan.next();
        
        String[] n = N.split("",0);
        int[] l = new int[10];
		
		int b = Integer.parseInt(N);
        
        for(int i=0;i<n.length;i++){
            l[i] = Integer.parseInt(n[i]);
        }
        
		int a = 0;
        for(int j=0;j<n.length;j++){
            a += l[j];
        }
		
		int ans = b % a;
        
        if(ans == 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
}

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

#include<iostream>
using namespace std;
int main(){
  int N;
  cin>>N;
  int a[9]=0;
  int d=10;
  for(int i=0;i<=9;i++){
    a[i]=
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: array must be initialized with a brace-enclosed initializer
    6 |   int a[9]=0;
      |            ^
a.cc:10:3: error: expected primary-expression before 'return'
   10 |   return 0;
      |   ^~~~~~
a.cc:11:2: error: expected '}' at end of input
   11 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <queue>
#include <vector>
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define PA pair<int,int>
#define PB push_back
#define PQ priority_queue<int>
#define PGQ priority_queue<int,vector<int>,greater<int> >
#define VE vector<int>
#define MOD 10000
#define INF 1000000007
using namespace std;
//
int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  string S;
  int sum=0;
  cin>>S;
  FOR(i,0,(int)S.size()){
    sum+=S[i]+'0';
  }
  if(stoi(S)%sum==0){
    cout<<Yes<<endl;
  }else{
    cout<<No<<endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:11: error: 'Yes' was not declared in this scope
   27 |     cout<<Yes<<endl;
      |           ^~~
a.cc:29:11: error: 'No' was not declared in this scope
   29 |     cout<<No<<endl;
      |           ^~
Language: C

#include <stdio.h>
int main(void){
int a,b,c;
scnaf("%d",&a);
b = a / 10;
c = a % 10;
if(a % (b + c) == 0){
printf("Yes");
}else{
printf("No");
}
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:1: error: implicit declaration of function 'scnaf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    4 | scnaf("%d",&a);
      | ^~~~~
      | scanf
Language: C++

#include <iostream>
#include <fstream>
#include <string> 
#include <cmath>  
#include <cstdlib>
#include <ctime>
#include <vector>
#include <algorithm>
#include <numeric>
#include <map>
#include <set>
#include <functional>
 
#define FOR(i, m, n) for(int i = (m);i < (n);i++)
#define REP(i,n) for(int i = 0; i < int(n); i++)
 
using namespace std;
using ll = long long;
 
int main() {
	ll X;
	cin >> X;
	ll X0 = X;
	ll sum = 0;
	while (X != 0) {
		ll a = X % (ll)10;
		X = X / (ll)10;
		sum += a;
	}
	if (X0 % sum == 0) cout << "Yes" << endl;
	else cout << "No" << endl;
	return 0;
}

Compiler output:
a.cc:13:1: error: extended character   is not valid in an identifier
   13 |  
      | ^
a.cc:16:1: error: extended character   is not valid in an identifier
   16 |  
      | ^
a.cc:19:1: error: extended character   is not valid in an identifier
   19 |  
      | ^
a.cc:13:1: error: '\U000000a0' does not name a type
   13 |  
      | ^
a.cc:19:1: error: '\U000000a0' does not name a type
   19 |  
      | ^
Language: C++

#include < cstdio >
int N;
int main ()
{
scanf ("%d" ,&N);
int t =N , c =0;
while (t >0) c += t %10 , t /=10;
if ( N % c ==0) puts("Yes");
else puts("No");
}

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

#include<iostream>
using namespace std;
int main()
{
  long int a,sum,d,i;
  cin>>a;
  d=a;
  sum=0;
  for(i=0;i<8,i++){
    sum=sum+a%10;
    a=a/10;}
  if(d%sum==0)
    cout<<"yes";
  else
    cout<<"no";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: expected ';' before ')' token
    9 |   for(i=0;i<8,i++){
      |                  ^
      |                  ;
Language: Java

import java.util.*;

class Main{
    public static void main(String[] args){
        
        Scanner scan = new Scanner(System.in);
        String N = scan.next();
        
        String[] n = N.split("",0);
        int[] l = new int[10];
        
        for(int i=0;i<n.length;i++){
            l[i] = Intrger.perseInt(n[i]);
        }
        int ans = 0;
        for(int j=0;j<l.length;j++){
            ans += l[j];
        }
        System.out.println(ans);
    }
}

Compiler output:
Main.java:13: error: cannot find symbol
            l[i] = Intrger.perseInt(n[i]);
                   ^
  symbol:   variable Intrger
  location: class Main
1 error
Language: Java

import java.util.*;

class Main{
    public static void main(String[] args){
        
        Scanner scan = new Scanner(System.in);
        String N = scan.next();
        
        String[] n = N.split("",0);
        int[] l = new int[10];
        
        for(int i=0;i<n.length;i++){
            l[i] = Intrger.perseInt(n[i]);
        }
        int ans = 0;
        for(int j=0;j<l.length;j++){
            ans += l[j];
        }
        
    }
}

Compiler output:
Main.java:13: error: cannot find symbol
            l[i] = Intrger.perseInt(n[i]);
                   ^
  symbol:   variable Intrger
  location: class Main
1 error
Language: C

#include <stdio.h>
 
int main(void){
	int x, sum = 0;
 long long n;
	scanf("%lld", &n);
	x = n;
 
while(n => 1){
sum = sum + n % 10;
n = n / 10;
 
}
 
if( x % sum == 0) printf("Yes");
else printf("No");
 
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:10: error: expected expression before '>' token
    9 | while(n => 1){
      |          ^
Language: C++

import java.util.*;

class Main{
    public static void main(String[] args){
        
        Scanner scan = new Scanner(System.in);
        String N = scan.next();
        
        String[] n = N.split("",0);
        int[] l = new int[10];
        
        for(int i=0;i<n.length;i++){
            l[i] = Intrger.perseInt(n[i]);
        }
        int ans = 0;
        for(int j=0;j<l.length;j++){
            ans += l[j];
        }
        
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:11: error: expected ':' before 'static'
    4 |     public static void main(String[] args){
      |           ^~~~~~~
      |           :
a.cc:4:29: error: 'String' has not been declared
    4 |     public static void main(String[] args){
      |                             ^~~~~~
a.cc:4:38: error: expected ',' or '...' before 'args'
    4 |     public static void main(String[] args){
      |                                      ^~~~
a.cc:21:2: error: expected ';' after class definition
   21 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:6:9: error: 'Scanner' was not declared in this scope
    6 |         Scanner scan = new Scanner(System.in);
      |         ^~~~~~~
a.cc:7:9: error: 'String' was not declared in this scope
    7 |         String N = scan.next();
      |         ^~~~~~
a.cc:9:16: error: expected primary-expression before ']' token
    9 |         String[] n = N.split("",0);
      |                ^
a.cc:10:12: error: structured binding declaration cannot have type 'int'
   10 |         int[] l = new int[10];
      |            ^~
a.cc:10:12: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:10:12: error: empty structured binding declaration
a.cc:10:15: error: expected initializer before 'l'
   10 |         int[] l = new int[10];
      |               ^
a.cc:12:23: error: 'n' was not declared in this scope
   12 |         for(int i=0;i<n.length;i++){
      |                       ^
a.cc:13:13: error: 'l' was not declared in this scope
   13 |             l[i] = Intrger.perseInt(n[i]);
      |             ^
a.cc:13:20: error: 'Intrger' was not declared in this scope
   13 |             l[i] = Intrger.perseInt(n[i]);
      |                    ^~~~~~~
a.cc:16:23: error: 'l' was not declared in this scope
   16 |         for(int j=0;j<l.length;j++){
      |                       ^
Language: C

#include<stdio.h>

int main(){
  int n,a,b,c,d,e,f,g,h,sum;
  char A="Yes";
  char B="No";
  
  scanf("%d",&n);
  a=n%10;
  b=(n-a)%100;
  c=(n-n%100)%1000;
  d=(n-n%1000)%10000;
  e=(n-n%10000)%100000;
  f=(n-n%100000)%1000000;
  g=(n-n%1000000)%10000000;
  h=(n-n%10000000)%100000000;
  
  sum=a+b+c+d+e+f+g+h;
  if(n%sum=0) {
    printf("%c\n",A);
  } else {
    printf("%c\n",B);
  }
  return 0;
}
  

  

Compiler output:
main.c: In function 'main':
main.c:5:10: error: initialization of 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
    5 |   char A="Yes";
      |          ^~~~~
main.c:6:10: error: initialization of 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
    6 |   char B="No";
      |          ^~~~
main.c:19:11: error: lvalue required as left operand of assignment
   19 |   if(n%sum=0) {
      |           ^
Language: C++

#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstring>
using namespace std;
int main()
{
	char a[15];
	while(scanf("%s",a)!=EOF)
	{
		for(int i=1;i<=strlen(a);i++)
		{
			int s1=1;int f=1;
			s1*=a[i];
			if(a[i]/s1==0)f=1;
		}
		if(f==1)cout<<"Yes"<<endl;
		else cout<<"No"<<endl;
	
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:20: error: 'f' was not declared in this scope
   17 |                 if(f==1)cout<<"Yes"<<endl;
      |                    ^
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int sum = 0;
        int div = 1;
        int nlength =String.valueOf(n).length();
        for(int i = 0; i > nlength; i++){
            sum = (n / div) / 10 + sum;
            div = div * 10
        }
        if(n / sum == 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
		
	}
}

Compiler output:
Main.java:11: error: ';' expected
            div = div * 10
                          ^
1 error
Language: C

#include<stdio.h>

int main(){
  int n,a,b,c,d,e,f,g,h,sum;
  
  scanf("%d",&n);
  a=n%10;
  b=(n-a)%100;
  c=(n-n%100)%1000;
  d=(n-n%1000)%10000;
  e=(n-n%10000)%100000;
  f=(n-n%100000)%1000000;
  g=(n-n%1000000)%10000000;
  h=(n-n%10000000)%100000000;
  
  sum=a+b+c+d+e+f+g+h;
  if(n%sum=0) {
    printf("%c\n",Yes);
  } else {
    printf("%c\n",No);
  }
  return 0;
}
  

Compiler output:
main.c: In function 'main':
main.c:17:11: error: lvalue required as left operand of assignment
   17 |   if(n%sum=0) {
      |           ^
main.c:18:19: error: 'Yes' undeclared (first use in this function)
   18 |     printf("%c\n",Yes);
      |                   ^~~
main.c:18:19: note: each undeclared identifier is reported only once for each function it appears in
main.c:20:19: error: 'No' undeclared (first use in this function)
   20 |     printf("%c\n",No);
      |                   ^~
Language: C

#include<stdio.h>

int main(){
  int n,a,b,c,d,e,f,g,h,sum;
  char A='Yes';
  char B='No';
  
  scanf("%d",&n);
  a=n%10;
  b=(n-a)%100;
  c=(n-n%100)%1000;
  d=(n-n%1000)%10000;
  e=(n-n%10000)%100000;
  f=(n-n%100000)%1000000;
  g=(n-n%1000000)%10000000;
  h=(n-n%10000000)%100000000;
  
  sum=a+b+c+d+e+f+g+h;
  if(n%sum=0) {
    printf("%c\n",A);
  } else {
    printf("%c\n",B);
  }
  return 0;
}
  

Compiler output:
main.c: In function 'main':
main.c:5:10: warning: multi-character character constant [-Wmultichar]
    5 |   char A='Yes';
      |          ^~~~~
main.c:5:10: warning: overflow in conversion from 'int' to 'char' changes value from '5858675' to '115' [-Woverflow]
main.c:6:10: warning: multi-character character constant [-Wmultichar]
    6 |   char B='No';
      |          ^~~~
main.c:6:10: warning: overflow in conversion from 'int' to 'char' changes value from '20079' to '111' [-Woverflow]
main.c:19:11: error: lvalue required as left operand of assignment
   19 |   if(n%sum=0) {
      |           ^
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int sum = 0;
        int = div;
        int nlength =String.valueOf(n).length();
        for(int i = 0; i > nlength; i++){
            div = div * 10;
            sum = n / div + sum;
        }
        if(n / sum == 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
		
	}
}

Compiler output:
Main.java:7: error: not a statement
        int = div;
        ^
Main.java:7: error: ';' expected
        int = div;
           ^
Main.java:7: error: not a statement
        int = div;
              ^
3 errors
Language: C

#include<stdio.h>

int main(){
  int n,a,b,c,d,e,f,g,h,sum;
  char yes='Yes';
  char no='No';
  
  scanf("%d",&n);
  a=n%10;
  b=(n-a)%100;
  c=(n-n%100)%1000;
  d=(n-n%1000)%10000;
  e=(n-n%10000)%100000;
  f=(n-n%100000)%1000000;
  g=(n-n%1000000)%10000000;
  h=(n-n%10000000)%100000000;
  
  sum=a+b+c+d+e+f+g+h;
  if(n%sum=0) {
    printf("%c\n",yes);
  } else {
    printf("%c\n",no);
  }
  return 0
}
  

Compiler output:
main.c: In function 'main':
main.c:5:12: warning: multi-character character constant [-Wmultichar]
    5 |   char yes='Yes';
      |            ^~~~~
main.c:5:12: warning: overflow in conversion from 'int' to 'char' changes value from '5858675' to '115' [-Woverflow]
main.c:6:11: warning: multi-character character constant [-Wmultichar]
    6 |   char no='No';
      |           ^~~~
main.c:6:11: warning: overflow in conversion from 'int' to 'char' changes value from '20079' to '111' [-Woverflow]
main.c:19:11: error: lvalue required as left operand of assignment
   19 |   if(n%sum=0) {
      |           ^
main.c:24:11: error: expected ';' before '}' token
   24 |   return 0
      |           ^
      |           ;
   25 | }
      | ~
Language: C

#include<stdio.h>
int main()
{
	int N;
	int a,b,c;
	scanf("%d",&N);
	a=N/10;
	b=N%10;
	c=a+b;
	if(N%c==0)
	printf("Yes\n");
	else
	printf("No\n";)
	return 0;
 } 

Compiler output:
main.c: In function 'main':
main.c:13:22: error: expected ')' before ';' token
   13 |         printf("No\n";)
      |               ~      ^
      |                      )
main.c:13:24: error: expected ';' before 'return'
   13 |         printf("No\n";)
      |                        ^
      |                        ;
   14 |         return 0;
      |         ~~~~~~
Language: C++

#include <stdio.h>
#include <math.h>
 
int main(void){
	
	int s,n,a,b,c,d,e,f,g,h,i;
	
	s = scanf("%d",&n);
	
	if(s == EOF){
		printf("error\n");
		return -1;
	}else if(1<= n && n <=100000000){
		
		a = n/100000000;
		b = (n/10000000)%10;
		c = (n/1000000)%10;
		d = (n/100000)%10;
		e = (n/10000)%10;
		f = (n/1000)%10;
		g = (n/100)%10;
		h = n%10;
		
		i = a+b+c+d+e+f+g+h;
			
		if(n%i == 0){
			printf("Yes\n");
		}else{
			printf("No\n");
		}
		return 0;
	}else{
		printf("error\n");
		return -1;
	}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:10: error: expected '}' at end of input
   35 |         }
      |          ^
a.cc:4:15: note: to match this '{'
    4 | int main(void){
      |               ^
Language: C

#include<stdio.h>
int main()
{
	long n;
	int a,b,c;
	a=n/10;
	b=n%10;
	c=a+b;
	if(n%c==0)
	printf("Yes");
	else
	printf("No";)
	return 0;
 } 

Compiler output:
main.c: In function 'main':
main.c:12:20: error: expected ')' before ';' token
   12 |         printf("No";)
      |               ~    ^
      |                    )
main.c:12:22: error: expected ';' before 'return'
   12 |         printf("No";)
      |                      ^
      |                      ;
   13 |         return 0;
      |         ~~~~~~
Language: C

#include<stdio.h>
#include<string.h>
int yang(int f)
{
	return f;
}
int main()
{
	int n;
	char a[10];
	while(gets(a)!=NULL)
	{1
		int n,i,m,g,s=0;
		n=strlen(a);
		for(i=0;i<n;i++)
		{
			a[i]=a[i]-'0';
			s+=a[i];
		}
		m=yang(g)%s;
		if(m==0)
			printf("Yes\n");
		else
			printf("No\n");
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:15: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   11 |         while(gets(a)!=NULL)
      |               ^~~~
      |               fgets
main.c:11:22: warning: comparison between pointer and integer
   11 |         while(gets(a)!=NULL)
      |                      ^~
main.c:12:11: error: expected ';' before 'int'
   12 |         {1
      |           ^
      |           ;
   13 |                 int n,i,m,g,s=0;
      |                 ~~~
main.c:15:21: error: 'i' undeclared (first use in this function)
   15 |                 for(i=0;i<n;i++)
      |                     ^
main.c:15:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:25: error: 's' undeclared (first use in this function)
   18 |                         s+=a[i];
      |                         ^
main.c:20:17: error: 'm' undeclared (first use in this function)
   20 |                 m=yang(g)%s;
      |                 ^
main.c:20:24: error: 'g' undeclared (first use in this function)
   20 |                 m=yang(g)%s;
      |                        ^
Language: C++

#include <iostream>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(0);
    int n
    cin >> n;
    int x = n;
    int s = 0;
    while (x != 0)
    {
        s += x % 10;
        x /= 10;
    }
    if (n % s == 0)
        cout << "Yes";
    else
        cout << "No";
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: expected initializer before 'cin'
    9 |     cin >> n;
      |     ^~~
a.cc:10:13: error: 'n' was not declared in this scope
   10 |     int x = n;
      |             ^
Language: Java

import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int sum = 0;
        int nlength = 1;
        int div = 0;
        int x = 10;
        while((n/10) != 0){
            nlength++;
            n/10;
        }
        for(int i = 0; i > nlength; i++){
            while(i > 0){
                if((n & 1)==1){
                div = div * x;
                }
                x = 10 * 10;
                n >>= 1;
            }
            sum = ((n / div)/10) + sum;
        }
        if(n / sum == 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
        
    }
}

Compiler output:
Main.java:12: error: not a statement
            n/10;
             ^
1 error
Language: C++

//競技プログラミング　テンプレ
//
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

#define REP(i,n) for(int i = 0; i < (int)(n); ++i)

const int max_v = 300;
const int INF = 1000000;



int main() {
	 long long int n, ans=0;
     int i=0;
	cin >> n;
	vector <long long  int> a(10);

    while(1){
        a[i] = n - (n /10)*10;
        i++;
        n = n/10;
        if(n==0){break;}
    }

    for (int k; k<=i k++) {ans +=a[k];}
    if(n % ans ==0) cout << "Yes" << endl;
    else cout << "No" << endl;
    
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:21: error: expected ';' before 'k'
   29 |     for (int k; k<=i k++) {ans +=a[k];}
      |                     ^~
      |                     ;
Language: C++

#include <stdio.h>
#include <math.h>
 
int main(void){
	
	int s,n,a,b,c,d,e,f,g,h,i;
	
	s = scanf("%d",&n);
	
	if(s == EOF){
		return -1;
		
	}else if(1<= n && n <=100000000){
		
		a = n/100000000;
		b = (n/10000000)%10;
		c = (n/1000000)%10;
		d = (n/100000)%10;
		e = (n/10000)%10;
		f = (n/1000)%10;
		g = (n/100)%10;
		h = n%10;
		
		i = a+b+c+d+e+f+g+h;
			
		if(n%i == 0){
			printf("Yes\n");
		}else{
			printf("No\n");
		}
		return 0;
	}else{
		return -1;
	}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:10: error: expected '}' at end of input
   34 |         }
      |          ^
a.cc:4:15: note: to match this '{'
    4 | int main(void){
      |               ^
Language: Java

import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int sum = 0;
        int nlength = 1;
        while((n/10) != 0){
            nlength++;
        }
        return nlength;   
        for(int i = 0; i > nlength; i++){
            sum = ((n / (int)Math.pow(10,i))/10) + sum;
        }
        if(n / sum == 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
        
    }
}

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

import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int sum = 0;
        int nlength = 0;
        do {
            nlength++;
            n /= 10;
        } while (n != 0);
        return nlength;
        }   
        for(int i = 0; i > nlength; i++){
            sum = ((n / (int)Math.pow(10,i))/10) + sum;
        }
        if(n / sum == 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
        
    }
}

Compiler output:
Main.java:14: error: illegal start of type
        for(int i = 0; i > nlength; i++){
        ^
Main.java:14: error: <identifier> expected
        for(int i = 0; i > nlength; i++){
                        ^
Main.java:14: error: <identifier> expected
        for(int i = 0; i > nlength; i++){
                                  ^
Main.java:14: error: <identifier> expected
        for(int i = 0; i > nlength; i++){
                                     ^
Main.java:17: error: illegal start of type
        if(n / sum == 0){
        ^
Main.java:17: error: <identifier> expected
        if(n / sum == 0){
            ^
Main.java:17: error: <identifier> expected
        if(n / sum == 0){
                  ^
Main.java:19: error: illegal start of type
        }else{
         ^
Main.java:24: error: class, interface, enum, or record expected
}
^
9 errors
Language: Java

import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int sum = 0;
        int nlength = 0;
        do {
            nlength++;
            value /= 10;
        } while (value != 0);
        return nlength;
        }   
        for(int i = 0; i > nlength; i++){
            sum = ((n / (int)Math.pow(10,i))/10) + sum;
        }
        if(n / sum == 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
        
    }
}

Compiler output:
Main.java:14: error: illegal start of type
        for(int i = 0; i > nlength; i++){
        ^
Main.java:14: error: <identifier> expected
        for(int i = 0; i > nlength; i++){
                        ^
Main.java:14: error: <identifier> expected
        for(int i = 0; i > nlength; i++){
                                  ^
Main.java:14: error: <identifier> expected
        for(int i = 0; i > nlength; i++){
                                     ^
Main.java:17: error: illegal start of type
        if(n / sum == 0){
        ^
Main.java:17: error: <identifier> expected
        if(n / sum == 0){
            ^
Main.java:17: error: <identifier> expected
        if(n / sum == 0){
                  ^
Main.java:19: error: illegal start of type
        }else{
         ^
Main.java:24: error: class, interface, enum, or record expected
}
^
9 errors
Language: Java

import java.util.*;


public class Main100 {
    public static void main(String[] args) {
        // 自分の得意な言語で
        // Let's チャレンジ！！

        Scanner sc = new Scanner(System.in);
        String N = sc.next();
				char[] Nparts = new char[N.length()];
				for(int i=0;i<N.length();i++){
						Nparts[i]= N.charAt(i);
				}

				int sum=0;

				for(int i=0;i<N.length();i++){
						sum+=Character.getNumericValue(Nparts[i]);
				}

				int Nint = Integer.parseInt(N);

				if(Nint%sum==0){
						System.out.println("Yes");
				}else{
						System.out.println("No");
				}
    }
}

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

//競技プログラミング　テンプレ
//
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

#define REP(i,n) for(int i = 0; i < (int)(n); ++i)

const int max_v = 300;
const int INF = 1000000;



int main() {
	 long long int n, ans=0;
     int i=0;
	cin >> n;
	vector <long long  int> a(n);

    while(1){
        a(i)= n - (n /10)*10;
        i++;
        n = n/10;
        if(n==0){break;}
    }

    REP(k,i) ans +=a(i);
    if(n % ans ==0) cout << "Yes" << endl;
    else cout << "No" << endl;
    
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:10: error: no match for call to '(std::vector<long long int>) (int&)'
   23 |         a(i)= n - (n /10)*10;
      |         ~^~~
a.cc:29:21: error: no match for call to '(std::vector<long long int>) (int&)'
   29 |     REP(k,i) ans +=a(i);
      |                    ~^~~
Language: C++

//競技プログラミング　テンプレ
//
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

#define REP(i,n) for(int i = 0; i < (int)(n); ++i)

const int max_v = 300;
const int INF = 1000000;



int main() {
	 long long int n, ans=0;
     int i=0;
	cin >> n;
	vector <int> a(n);

    while(1){
        a(i)= n - (n /10)*10;
        i++;
        n = n/10;
        if(n==0){break;}
    }

    REP(k,i) ans +=a(i);
    if(n % ans ==0) cout << "Yes" << endl;
    else cout << "No" << endl;
    
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:10: error: no match for call to '(std::vector<int>) (int&)'
   23 |         a(i)= n - (n /10)*10;
      |         ~^~~
a.cc:29:21: error: no match for call to '(std::vector<int>) (int&)'
   29 |     REP(k,i) ans +=a(i);
      |                    ~^~~
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int sum;
        int j;
        String jadge;
        int nlength =String.valueOf(n).length();
        for(int i; i > nlength; i++){
            sum = (n / (int)Math.pow(10,i)/10) + sum;
        }
        j = n / sum;
        if(j == 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
		
	}
}

Compiler output:
Main.java:10: error: variable i might not have been initialized
        for(int i; i > nlength; i++){
                   ^
Main.java:11: error: variable sum might not have been initialized
            sum = (n / (int)Math.pow(10,i)/10) + sum;
                                                 ^
Main.java:13: error: variable sum might not have been initialized
        j = n / sum;
                ^
3 errors
Language: C++

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

int main() {
	int n;
	cin >> n;
	int n1, n2 = n, ans = 0;
	while (n2 > 0) {
		n1 = n2 % 10;
		ans += n1;
		n2 = (n2 - n1) / 10;
	}
	if (ceil(n / ans) == floor(n / ans)) {
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: 'ceil' was not declared in this scope
   16 |         if (ceil(n / ans) == floor(n / ans)) {
      |             ^~~~
a.cc:16:30: error: 'floor' was not declared in this scope
   16 |         if (ceil(n / ans) == floor(n / ans)) {
      |                              ^~~~~
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int sum;
        int j;
        String jadge;
        int nlength =n.length();
        for(int i; i > nlength; i++){
            sum = (n / Math.pow(10,i)/10) + sum;
        }
        j = n / sum;
        if(j == 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
		
	}
}

Compiler output:
Main.java:9: error: int cannot be dereferenced
        int nlength =n.length();
                      ^
Main.java:11: error: incompatible types: possible lossy conversion from double to int
            sum = (n / Math.pow(10,i)/10) + sum;
                                          ^
2 errors
Language: C++

#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#pragma GCC optimize ("-O3")
using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
//---------------------------------------------------------------------------------------------------
/*---------------------------------------------------------------------------------------------------
　　　　　　　　　　　 ∧＿∧  
　　　　　 ∧＿∧ 　（´<_｀ ）　 Welcome to My Coding Space!
　　　　 （ ´_ゝ`）　/　 ⌒i     
　　　　／　　　＼　 　  |　|     
　　　 /　　 /￣￣￣￣/　　|  
　 ＿_(__ﾆつ/　    ＿/ .| .|＿＿＿＿  
　 　　　＼/＿＿＿＿/　（u　⊃  
---------------------------------------------------------------------------------------------------*/



int N;
//---------------------------------------------------------------------------------------------------
void _main() {
    cin >> N;

    int fx = 0;
    int x = N;
    while (x) {
        fx += x % 10;
        x /= 10;
    }

    if (X % fx == 0) printf("Yes\n");
    else printf("No\n");
}

Compiler output:
a.cc: In function 'void _main()':
a.cc:32:9: error: 'X' was not declared in this scope
   32 |     if (X % fx == 0) printf("Yes\n");
      |         ^
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int sum;
        int j;
        String jadge;
        int nlength =String.valueOf(n).lenght();
        for(int i; i > nlength; i++){
            sum = (n / Math.pow(10,i)/10) + sum;
        }
        j = n / sum;
        if(j == 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
		
	}
}

Compiler output:
Main.java:9: error: cannot find symbol
        int nlength =String.valueOf(n).lenght();
                                      ^
  symbol:   method lenght()
  location: class String
Main.java:11: error: incompatible types: possible lossy conversion from double to int
            sum = (n / Math.pow(10,i)/10) + sum;
                                          ^
2 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int sum;
        int j;
        String jadge;
        int nlength =String.valueOf(n).lenght();
        for(int i; i > nlength; i++){
            sum = (n / Math.pow(10,i)/10) + sum
        }
        j = n / sum;
        if(j == 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
		
	}
}

Compiler output:
Main.java:11: error: ';' expected
            sum = (n / Math.pow(10,i)/10) + sum
                                               ^
1 error
Language: C

#include<stdio.h>

int main() {

    int N, sum = 0, org;
    int n[10] = 0;

    scanf("%d", &N);
    org = N;

    for (int i = 0; N != 0; i++) {
        n[i] = N % 10;
        N = N / 10;
    }

    for (int i = 0; n[i] != '\0'; i++) {
        sum += n[i];
    }

    if (org % sum == 0) {
        puts("Yes");
    } else {
        puts("No");
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:17: error: invalid initializer
    6 |     int n[10] = 0;
      |                 ^
Language: C++

#include <iostream>
#include <cmath>
using namespace std;
int main(){
    long long x,a=0;
    cin >> x;
    if(x < 0) x *= -1;
    if(x < 10){
        cout << "Yes" << endl;
        return 0;
    }
    for(int i = 9; i >= 0; i--){
        long long int  = x / pow(10,i);
        a += tmp;
    }
    if(x%a){
        cout <<  "No"<< endl;
    }else{
        cout << "Yes" << endl;
    }
    return 0;
} 



Compiler output:
a.cc: In function 'int main()':
a.cc:13:24: error: expected unqualified-id before '=' token
   13 |         long long int  = x / pow(10,i);
      |                        ^
a.cc:14:14: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   14 |         a += tmp;
      |              ^~~
      |              tm