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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin >> N;
  int sum=0;
  int O==N;
  
  
  for(; O!=0; O/10){
    sum += (O%10);
  }
  
  if(N%sum=0){
    cout << "Yes" << endl;
  }
  
  else{
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: expected initializer before '==' token
    7 |   int O==N;
      |        ^~
a.cc:10:9: error: 'O' was not declared in this scope
   10 |   for(; O!=0; O/10){
      |         ^
a.cc:14:7: error: lvalue required as left operand of assignment
   14 |   if(N%sum=0){
      |      ~^~~~
Language: C++

#include<iosream>
using namespace std;

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

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

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

int main() {
  int N;
  int f_N = 0;
  int len;
  int mod;
  cin >> N;
  
  len = to_string(num).length();
  
  for ( int i = 0 ; i < len ; i++ ) {
    int ten_pow = 1;
    for ( int j = 0 ; j < i ; j++ ) {
      ten_pow *= 10;
    }
    f_N += (N % (ten_pow * 10) ) / ten_pow;
  }
  
  mod = N % f_N;
  
  if ( mod == 0) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: 'num' was not declared in this scope; did you mean 'enum'?
   11 |   len = to_string(num).length();
      |                   ^~~
      |                   enum
Language: Java

import java.util.*;

public class main{
  
	public static void main(String[] args) {
			Scanner sc = new Scanner(System.in);
			int a = sc.nextInt();
			int n = a;
			int[] array = new int[8]; 
			int b = 10;
			int sum = 0;
			for(int i = 0; i < 8; i++) {
				array[i] = a % b;
				a -= array[i];
				sum += array[i] / (b / 10);
				b *= 10;
			}
			if(n % sum == 0) {
				System.out.println("Yes");
			}else {
				System.out.println("No");
			}
		
		}
	}

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

public class main{
public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int n = a;
		int[] array = new int[8]; 
		int b = 10;
		int sum = 0;
		for(int i = 0; i < 8; i++) {
			array[i] = a % b;
			a -= array[i];
			sum += array[i] / (b / 10);
			b *= 10;
		}
		if(n % sum == 0) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
		
	}
}

Compiler output:
Main.java:1: error: class main is public, should be declared in a file named main.java
public class main{
       ^
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class main
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class main
3 errors
Language: Java

public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int n = a;
		int[] array = new int[8]; 
		int b = 10;
		int sum = 0;
		for(int i = 0; i < 8; i++) {
			array[i] = a % b;
			a -= array[i];
			sum += array[i] / (b / 10);
			b *= 10;
		}
		if(n % sum == 0) {
			System.out.println("YES");
		}else {
			System.out.println("NO");
		}
		
	}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java


import java.util.Scanner;
			
		Scanner sc = new Scanner(System.in);
		int sum = 0;
		int n = sc.nextInt();
		int nn = n;
		while(n != 0) {
			sum += n%10;
			n = n/10;
		}
		if(nn%sum == 0) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}

	
	

Compiler output:
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
		Scanner sc = new Scanner(System.in);
		^
  (use --enable-preview to enable unnamed classes)
Main.java:8: error: class, interface, enum, or record expected
		while(n != 0) {
		^
Main.java:10: error: class, interface, enum, or record expected
			n = n/10;
			^
Main.java:11: error: class, interface, enum, or record expected
		}
		^
Main.java:14: error: class, interface, enum, or record expected
		}
		^
Main.java:17: error: class, interface, enum, or record expected
		}
		^
6 errors
Language: Java


import java.util.Scanner;
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		int sum = 0;
		int n = sc.nextInt();
		int nn = n;
		while(n != 0) {
			sum += n%10;
			n = n/10;
		}
		if(nn%sum == 0) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}

	}
	

Compiler output:
Main.java:3: error: unnamed classes are a preview feature and are disabled by default.
	public static void main(String[] args) {
	              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

package spring2;
import java.util.Scanner;

public class Q80 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int sum = 0;
		int n = sc.nextInt();
		int nn = n;
		while(n != 0) {
			sum += n%10;
			n = n/10;
		}
		if(nn%sum == 0) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}

	}

}
	

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

Scanner sc = new Scanner(System.in);
		int sum = 0;
		int n = sc.nextInt();
		int nn = n;
		while(n != 0) {
			sum += n%10;
			n = n/10;
		}
		if(nn%sum == 0) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}

	

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
Scanner sc = new Scanner(System.in);
^
  (use --enable-preview to enable unnamed classes)
Main.java:5: error: class, interface, enum, or record expected
		while(n != 0) {
		^
Main.java:7: error: class, interface, enum, or record expected
			n = n/10;
			^
Main.java:8: error: class, interface, enum, or record expected
		}
		^
Main.java:11: error: class, interface, enum, or record expected
		}
		^
Main.java:14: error: class, interface, enum, or record expected
		}
		^
6 errors
Language: Java

import java.util.Scanner;

Scanner sc = new Scanner(System.in);
int sum = 0;
int n = input.nextInt();
while(n != 0){
	sum += n%10;
  	n = n/10;
}
if(n % sum == 0){
	System.out.println("Yes");
} 
else{
	System.out.println("No");
}

Compiler output:
Main.java:3: error: unnamed classes are a preview feature and are disabled by default.
Scanner sc = new Scanner(System.in);
^
  (use --enable-preview to enable unnamed classes)
Main.java:6: error: class, interface, enum, or record expected
while(n != 0){
^
Main.java:8: error: class, interface, enum, or record expected
  	n = n/10;
  	^
Main.java:9: error: class, interface, enum, or record expected
}
^
Main.java:12: error: class, interface, enum, or record expected
} 
^
Main.java:15: error: class, interface, enum, or record expected
}
^
6 errors
Language: C++

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

int main() {
  int N, S;
  S = 0;
  cin >> N;
  int i = 0
  while (N > 0) {
    S += (N % 10);
    N /= 10;
    i++;
  }
  if ((S % N) == 0){
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'while'
    9 |   while (N > 0) {
      |   ^~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;


int main(){
  ll n; cin>>n;
  ll wa=0;
  ll m=n;
  while(n>=1){
    wa+=n%10;
    n/=10;
  }
  if(m%wa==0){cout<<"Yes"<<endl;}
  else cout<<"No"<<endl;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'll' was not declared in this scope
    7 |   ll n; cin>>n;
      |   ^~
a.cc:7:14: error: 'n' was not declared in this scope; did you mean 'yn'?
    7 |   ll n; cin>>n;
      |              ^
      |              yn
a.cc:8:5: error: expected ';' before 'wa'
    8 |   ll wa=0;
      |     ^~~
      |     ;
a.cc:9:5: error: expected ';' before 'm'
    9 |   ll m=n;
      |     ^~
      |     ;
a.cc:11:5: error: 'wa' was not declared in this scope
   11 |     wa+=n%10;
      |     ^~
a.cc:14:6: error: 'm' was not declared in this scope; did you mean 'tm'?
   14 |   if(m%wa==0){cout<<"Yes"<<endl;}
      |      ^
      |      tm
a.cc:14:8: error: 'wa' was not declared in this scope
   14 |   if(m%wa==0){cout<<"Yes"<<endl;}
      |        ^~
Language: C++

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

int main(){

    string s;
    cin >> s;

    int b = 0;

    for(int i=0; i<s.length(); i++){
        b += (int)s[i];
    }

    int s_int = atoi(s);

    if(s_int % b == 0){
        cout << "Yes" << endl;
    }
    else{
        cout << "No" << endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:22: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   16 |     int s_int = atoi(s);
      |                      ^
      |                      |
      |                      std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/ext/string_conversions.h:43,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 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/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
Language: C++

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

int main() {
  int N;
  cin >> N;
  
  int sum = 0;
  int k = 10;
  while (k / 10 < N) {
    sum += (N % k) / (k - 1)
    k *= 10
  }
  
  if (N % sum) {
    cout << "No" << endl;
  }
  else {
    cout << "Yes" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:29: error: expected ';' before 'k'
   11 |     sum += (N % k) / (k - 1)
      |                             ^
      |                             ;
   12 |     k *= 10
      |     ~
Language: Java

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int sum = 0;
		while(N > 0) {
			sum = sum + N % 10;
			N = N  / 10; 
		}
		if(N % sum == 0) {
			System.out.println("Yes");
		}
		else System.out.println("No");
		sc.close();
	}
}


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

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

int main(){
	string s;
  	int ans=0;
  	cin>>s;
	for(int i=0;i<s.size();++i)ans+=(int)(s[i]+'0');
  	int n=(int)(s+"0");
  	if(ans%n==0)cout<<"Yes"<<endl;
  	else cout<<"No"<<endl;
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: invalid cast from type 'std::__cxx11::basic_string<char>' to type 'int'
   10 |         int n=(int)(s+"0");
      |               ^~~~~~~~~~~~
Language: C++

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

int main(){
	string s;
  	int ans=0;
  	cin>>s;
	for(int i=0;i<s.size();++i)ans+=(int)(s[i]+'0');
  	int n=(int)(s+'0');
  	if(ans%n==0)cout<<"Yes"<<endl;
  	else cout<<"No"<<endl;
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: invalid cast from type 'std::__cxx11::basic_string<char>' to type 'int'
   10 |         int n=(int)(s+'0');
      |               ^~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  // ここにプログラムを追記
  int N;
  cin >> N;
  int dig = log10(N)+1;
  int F = 0;
  if(dig > 9){
    cout << "out of range!" << endl;
  }
  for(int i = 0; i<dig-1;i++){
    F += N.at(i);
  }
  if(N%F == 0){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:12: error: request for member 'at' in 'N', which is of non-class type 'int'
   14 |     F += N.at(i);
      |            ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  // ここにプログラムを追記
  int N;
  cin >> N;
  int dig = N.size();
  int F = 0;
  if(dig > 9){
    cout << "out of range!" << endl;
  }
  for(int i = 0; i<dig-1;i++){
    F += N.at(i);
  }
  if(N%F == 0){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: request for member 'size' in 'N', which is of non-class type 'int'
    8 |   int dig = N.size();
      |               ^~~~
a.cc:14:12: error: request for member 'at' in 'N', which is of non-class type 'int'
   14 |     F += N.at(i);
      |            ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() 
{
  int N, n, g=0, r;
  cin >> N;
  n = N;
  for (int i=8; i>=0; i--)
  {
    r=1;
    for (int j=0, j<i, j++)
    {
      r *= 10;
    }
    g += N / r;
    N -= (N / r) * r;
  }
 
  if (n % g ==0)
  {
    cout << "Yes" << endl;
  }
  else
    cout << "No" << endl;
}

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

#include <bits/stdc++.h>
using namespace std;
 
int main() 
{
  int N, n, g=0, r;
  cin >> N;
  n = N;
  for (int i=8; i=>0; i--)
  {
    r=1;
    for (int j=0, j<i, j++)
    {
      r *= 10;
    }
    g += N / r;
    N -= (N / r) * r;
  }
 
  if (n % g ==0)
  {
    cout << "Yes" << endl;
  }
  else
    cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: expected primary-expression before '>' token
    9 |   for (int i=8; i=>0; i--)
      |                   ^
a.cc:12:20: error: expected ';' before '<' token
   12 |     for (int j=0, j<i, j++)
      |                    ^
      |                    ;
a.cc:12:20: error: expected primary-expression before '<' token
a.cc:12:27: error: expected ';' before ')' token
   12 |     for (int j=0, j<i, j++)
      |                           ^
      |                           ;
Language: C++

include <bits/stdc++.h>
using namespace std;
 
int main() 
{
  int N, n, g=0, r;
  cin >> N;
  n = N;
  for (int i=8; i=>0; i--)
  {
    r=1;
    for (int j=0, j<i, j++)
    {
      r *= 10;
    }
    g += N / r;
    N -= (N / r) * r;
  }
 
  if (n % g ==0)
  {
    cout << "Yes" << endl;
  }
  else
    cout << "No" << 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:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> N;
      |   ^~~
a.cc:9:19: error: expected primary-expression before '>' token
    9 |   for (int i=8; i=>0; i--)
      |                   ^
a.cc:12:20: error: expected ';' before '<' token
   12 |     for (int j=0, j<i, j++)
      |                    ^
      |                    ;
a.cc:12:20: error: expected primary-expression before '<' token
a.cc:12:27: error: expected ';' before ')' token
   12 |     for (int j=0, j<i, j++)
      |                           ^
      |                           ;
a.cc:22:5: error: 'cout' was not declared in this scope
   22 |     cout << "Yes" << endl;
      |     ^~~~
a.cc:22:22: error: 'endl' was not declared in this scope
   22 |     cout << "Yes" << endl;
      |                      ^~~~
a.cc:25:5: error: 'cout' was not declared in this scope
   25 |     cout << "No" << endl;
      |     ^~~~
a.cc:25:21: error: 'endl' was not declared in this scope
   25 |     cout << "No" << endl;
      |                     ^~~~
Language: C++

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

/* REPmacro */
#define REP(i,n) for(int i=0,i##_len=(n);i<i##_len;++i)
#define REPR(i,n) for(int i=((int)(n)-1);i>=0;--i)
#define FOR(i,m,n) for(int i=(int)(m);i<(int)(n);++i)

/*alias*/
#define ALL(x) (x).begin(),(x).end()
#define SZ(x) ((int)(x).size())
#define F first
#define S second
#define PB push_back
#define MP make_pair 

#define y0 y3487465
#define y1 y8687969
#define j0 j1347829
#define j1 j234892
#define next asdnext
#define prev asdprev

/*using*/
using ll = long long;
using ull = unsigned long long;
using unsi = unsigned;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using pii = pair<int, int>;
using db = double;
using plex = complex<double>;
using vs = vector<string>;

/*template*/
template<class T>inline bool amax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>inline bool amin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

/* func */

/*struct*/
struct aaa{
    aaa(){
        cin.tie(0); ios::sync_with_stdio(0); cout<<fixed<<setprecision(20);
    };
}aaaaaaa;

/* const */
const int INF = 1001001001;
const ll LINF = 1001001001001001001ll;
const int MOD = 1e9 + 7; //10^9
const db EPS = 1e-9;
const int dx[] = {0, 1, 0, -1, 1, -1, 1, -1}, dy[] = {1, 0, -1, 0, 1, -1, -1, 1};

//#define int ll
//#define int long long

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

signed main()
{
  int n; cin >> n;
  int s = func(n);
  if(n % 10 == 0)
    cout << "Yes";
  else
    cout << "No"
  
  return 0;
}

Compiler output:
a.cc: In function 'int func(int)':
a.cc:61:25: error: expected ';' before '}' token
   61 |   return func(n/10)+n%10
      |                         ^
      |                         ;
   62 | }
      | ~                        
a.cc: In function 'int main()':
a.cc:71:17: error: expected ';' before 'return'
   71 |     cout << "No"
      |                 ^
      |                 ;
   72 | 
   73 |   return 0;
      |   ~~~~~~
Language: Java

import java.util.Scanner;
public class Atcoder080 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int value = N;
		int sum=0;
		for(int i=0;i<9;i++) {
			sum +=  (value % 10); value /= 10;
			System.out.println(sum);
			if(value == 0)break;
		}
		
		if(N%sum == 0) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}
}


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

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

int main () {
  int X, f;
  
  cin >> X;
  
  f = 0
    
  f = X / 100000000 + (X % 100000000) / 10000000
    + (X % 10000000) / 1000000 + (X % 10000000) / 1000000
    + (X % 1000000) / 100000 + (X % 100000) / 10000
    + (X % 10000) / 1000 + (X % 1000) / 100 + (X % 100) / 10
    + X % 10;
  
  if (X % f == 0) {
    cout << "Yes" << endl;
  }
  
  else {
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: expected ';' before 'f'
    9 |   f = 0
      |        ^
      |        ;
   10 | 
   11 |   f = X / 100000000 + (X % 100000000) / 10000000
      |   ~
Language: C++

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

int main () {
  int X, f;
  
  cin >> X;
  
  f = X / 100000000 + (X % 100000000) / 10000000
    + (X % 10000000) / 1000000 + (X % 10000000) / 1000000
    + (X % 1000000) / 100000 + (X % 100000) / 10000
    + (X % 10000) / 1000 + (X % 1000) / 100 + (X % 100) / 10
    + X % 10;
  
  if (X % f == 0) {
    cout << "Yes" << endl;
  }

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

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

int main ()
{
  int N;
  cin >> N;
  int c = N;
  
  while(N >= 0){
    a = N % 10;
  	N = N / 10;
  	b += a;
  }
  
  if(c % b == 0){
   cout << "Yes" << endl; 
  }else{
   cout << "No" << endl; 
  }
}
 

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'a' was not declared in this scope
   11 |     a = N % 10;
      |     ^
a.cc:13:9: error: 'b' was not declared in this scope
   13 |         b += a;
      |         ^
a.cc:16:10: error: 'b' was not declared in this scope
   16 |   if(c % b == 0){
      |          ^
Language: C++

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

int main(void){
    int N,sum=0;
    cin>>N;
    int n=N;

    for(int i=0;ie8;i++){
        sum+=N%10;
        N/=10;
    }
    cout<<(n%sum==0?"Yes":"No")<<endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'ie8' was not declared in this scope
    9 |     for(int i=0;ie8;i++){
      |                 ^~~
Language: C++

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

int main(void){
    int N,sum;
    cin>>N;

    while(N>=10){
        sum+=N%10;
        N/=10;
    }
    cout<<(N%sum==0?("Yes":"No"))<<endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:27: error: expected ')' before ':' token
   12 |     cout<<(N%sum==0?("Yes":"No"))<<endl;
      |                     ~     ^
      |                           )
a.cc:12:40: error: expected ':' before ';' token
   12 |     cout<<(N%sum==0?("Yes":"No"))<<endl;
      |                                        ^
      |                                        :
a.cc:12:40: error: expected primary-expression before ';' token
a.cc:12:40: error: expected ')' before ';' token
   12 |     cout<<(N%sum==0?("Yes":"No"))<<endl;
      |           ~                            ^
      |                                        )
Language: C++

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

int main(void){
    int N,sum;
    cin>>N;

    while(N>=10){
        sum+=N%10;
        N/=10;
    }
    cout<<(N%sum==0?("Yes":"No"))<<endl;

    return 0;
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #iclude; did you mean #include?
    1 | #iclude<bits/stdc++.h>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin>>N;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #iclude<bits/stdc++.h>
a.cc:12:5: error: 'cout' was not declared in this scope
   12 |     cout<<(N%sum==0?("Yes":"No"))<<endl;
      |     ^~~~
a.cc:12:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:27: error: expected ')' before ':' token
   12 |     cout<<(N%sum==0?("Yes":"No"))<<endl;
      |                     ~     ^
      |                           )
a.cc:12:40: error: expected ':' before ';' token
   12 |     cout<<(N%sum==0?("Yes":"No"))<<endl;
      |                                        ^
      |                                        :
a.cc:12:40: error: expected primary-expression before ';' token
a.cc:12:40: error: expected ')' before ';' token
   12 |     cout<<(N%sum==0?("Yes":"No"))<<endl;
      |           ~                            ^
      |                                        )
Language: C++

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

int main(){
  int N;
  cin>>N;
  int x=0;
  for(int i=0;i<8;i++){
    x+=N%10
    N/=10
  }
  if(N%x==0){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: expected ';' before 'N'
    9 |     x+=N%10
      |            ^
      |            ;
   10 |     N/=10
      |     ~
Language: C++

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

int calc(int k){
  int tes =0;
  while(k>0){
    tes += n%10;
    k /= 10;
  }
  return tes;
}

int main(){
  int n;
  cin >> n;
  int f = calc(n);
  if(n%f == 0){
    cout << 'Yes' <<endl;
  }else if(n%f != 0){
    cout << 'No' <<endl;
  }
}


Compiler output:
a.cc:18:13: warning: multi-character character constant [-Wmultichar]
   18 |     cout << 'Yes' <<endl;
      |             ^~~~~
a.cc:20:13: warning: multi-character character constant [-Wmultichar]
   20 |     cout << 'No' <<endl;
      |             ^~~~
a.cc: In function 'int calc(int)':
a.cc:7:12: error: 'n' was not declared in this scope
    7 |     tes += n%10;
      |            ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'icn' was not declared in this scope
   12 |   int n;icn>>n;
      |         ^~~
Language: C++

#include <iostream>
using namespace std;

int findSumOfDigits(int x) {
  int sum = 0;
  while(x >= 10) {
    sum = x % 10;
    x /= 10;
  }
  return sum;
}

int main () {
  int ans = "No";
  int N;
  cin >> N;
  int sum = findSumOfDigits(N);
  if(N % sum == 0) {
    ans = "Yes";
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   14 |   int ans = "No";
      |             ^~~~
      |             |
      |             const char*
a.cc:19:11: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   19 |     ans = "Yes";
      |           ^~~~~
      |           |
      |           const char*
Language: C++

#include <iostream>
using namespace std;

int findSumOfDigits(int x) {
  int sum = 0;
  while(x >= 10) {
    sum = x % 10;
    x /= 10;
  }
  return sum;
}

int main () {
  int ans = "No";
  int N;
  cin >> N;
  sum = findSumOfDigits(N);
  if(N % sum == 0) {
    ans = "Yes";
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   14 |   int ans = "No";
      |             ^~~~
      |             |
      |             const char*
a.cc:17:3: error: 'sum' was not declared in this scope
   17 |   sum = findSumOfDigits(N);
      |   ^~~
a.cc:19:11: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   19 |     ans = "Yes";
      |           ^~~~~
      |           |
      |           const char*
Language: C++

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

int main(){
  string n;
  cin >> n;
  
  int sum = 0;
  for(int i = 0; i < s.size(); i++){
    sum += s[i] - '0';
  }
  if(stoi(n) % sum == 0){
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:12:22: error: 's' was not declared in this scope
   12 |   for(int i = 0; i < s.size(); 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();
  String po=n+"";
  String s[]=po.split("",0);
  int ans=0;
  for(int i=0;s.length;i++)ans+=Integer.parseInt(s[i]);
  System.out.println((n%ans==0)?"Yes":"No");
}}


Compiler output:
Main.java:8: error: incompatible types: int cannot be converted to boolean
  for(int i=0;s.length;i++)ans+=Integer.parseInt(s[i]);
               ^
1 error
Language: C++

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

int main() {
  int n;
  cin>>n;
  int x=0;
  int Ncopy=n;
  while (N>0){
    x+=N%10;
    N/=10;
    }
  if (Ncopy%x==0)
    cout<<"Yes"<<endl;
  else
    cout<<"No"<<endl;
      }

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: 'N' was not declared in this scope
    9 |   while (N>0){
      |          ^
Language: C++

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

int main(){
  int N,x,y;
  y = 0;
  cin >> N;
  Sn = N;
  for(int i=0;;i++){
    y += N % 10;
    N /= 10;
    if(i == 8){
      if(Sn%y == 0){
        cout << "Yes";
      }else{
        cout << "No";
      }
      break;
    }
  }
}

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

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

int main(){
  int N,x,y;
  y = 0;
  cin >> N;
  Sn = N;
  for(int i=0;;i++){
    y += N % 10;
    N /= 10;
    if(i == 8){
      if(Sn%y == 0){
        cout << Yes;
      }else{
        cout << No;
      }
      break;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'Sn' was not declared in this scope; did you mean 'yn'?
    8 |   Sn = N;
      |   ^~
      |   yn
a.cc:14:17: error: 'Yes' was not declared in this scope
   14 |         cout << Yes;
      |                 ^~~
a.cc:16:17: error: 'No' was not declared in this scope; did you mean 'N'?
   16 |         cout << No;
      |                 ^~
      |                 N
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: expected ';' before 'a'
   10 |     sum +=a%10
      |               ^
      |               ;
   11 |       a=a/10
      |       ~
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
#include<complex>
#include<string>
#include<string.h>
using namespace std;
typedef long long int llint;
#define rep(i,n) for(int i=0;i<n;i++)

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: redeclaration of 'int b'
   14 |         int b = a;
      |             ^
a.cc:12:16: note: 'int b' previously declared here
   12 |         int a, b, c, d;
      |                ^
Language: C++

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

int main() {
  int N,sum,q,r;
  sum = 0;
  q = N;
  for (int i=0;i<8;i++){
    r = q%10;
    q/=10; 
    sum += r;
    if (i == 8-1){
      sum +=q;
    }
  }
  if !(N%sum){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:6: error: expected '(' before '!' token
   16 |   if !(N%sum){
      |      ^
      |      (
a.cc:18:4: error: 'else' without a previous 'if'
   18 |   }else{
      |    ^~~~
Language: C++

#include <iostream>
using namespace std;

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

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

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

int main() {
  int N;
  int A;
  cin >> N;
  A = 0;
  n = N;
  
  for (int i = 0; i < 9; i++) {
    if (n >= 10) {
      A += n % 10;
      n = n / 10;
    }
    else {
      A += n;
      break;
    }
  }
  
  if (N % A == 0) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'n' was not declared in this scope
    9 |   n = N;
      |   ^
Language: C++

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

int main() {
  int N;
  int A;
  cin >> N;
  A = 0;
  n = N;
  
  for (int i = 0, i < 9, i++) {
    if (n >= 10) {
      A += n % 10;
      n = n / 10;
    }
    else {
      A += n;
      break;
    }
  }
  
  if (N % A == 0) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'n' was not declared in this scope
    9 |   n = N;
      |   ^
a.cc:11:20: error: expected ';' before '<' token
   11 |   for (int i = 0, i < 9, i++) {
      |                    ^~
      |                    ;
a.cc:11:21: error: expected primary-expression before '<' token
   11 |   for (int i = 0, i < 9, i++) {
      |                     ^
a.cc:11:29: error: expected ';' before ')' token
   11 |   for (int i = 0, i < 9, i++) {
      |                             ^
      |                             ;
Language: C++

#include <iostream>
using namespace std;

int getDigitSum(int n);

int main(){
cin>>N;
if(N%getDigitSum(N)==0) cout<<"YES"<<endl;
 else cout<<"NO"<<endl;
  return 0;
}

int getDigitSum(int n){
  int object=n;
  int ans=0;
  for(;;){
    if(object == 0) break;
    ans += object%10;
    object=object/10;
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: 'N' was not declared in this scope
    7 | cin>>N;
      |      ^
a.cc: In function 'int getDigitSum(int)':
a.cc:22:1: warning: no return statement in function returning non-void [-Wreturn-type]
   22 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

int getDigitSum(int n);

int main(){
cin>>N;
if(N%getDigitSum(N)==0) cout<<"Yes”<<endl;
 else cout<<"No"<<endl;
  return 0;
}

int getDigitSum(int n){
  int object=n;
  int ans=0;
  for(;;){
    if(object == 0) break;
    ans += object%10;
    object=object/10;
  }
  
}

Compiler output:
a.cc:8:31: warning: missing terminating " character
    8 | if(N%getDigitSum(N)==0) cout<<"Yes”<<endl;
      |                               ^
a.cc:8:31: error: missing terminating " character
    8 | if(N%getDigitSum(N)==0) cout<<"Yes”<<endl;
      |                               ^~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:6: error: 'N' was not declared in this scope
    7 | cin>>N;
      |      ^
a.cc:9:2: error: expected primary-expression before 'else'
    9 |  else cout<<"No"<<endl;
      |  ^~~~
a.cc: In function 'int getDigitSum(int)':
a.cc:22:1: warning: no return statement in function returning non-void [-Wreturn-type]
   22 | }
      | ^
Language: C++

n=input()
nn=int(n)
h=0
for i in range(len(n)):
    h+=int(n[i])
c=nn%h
if c==0:
    print("Yes")
else:
    print("No") 

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

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

int findSumOfDigits(int n) {
  int sum = 0;
  while (n > 0) {
    sum += n % 10;
    n /= 10;
  }
  return sum;
}

 
int main() {
  int N;
  cin >> N;
  int sum = findSumOfDigits(N)
  
 if (N % sum ==0 ){ cout << "Yes" << endl;}
  else {cout << "No"<< endl;}
  
}
    
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:19:2: error: expected ',' or ';' before 'if'
   19 |  if (N % sum ==0 ){ cout << "Yes" << endl;}
      |  ^~
a.cc:20:3: error: 'else' without a previous 'if'
   20 |   else {cout << "No"<< endl;}
      |   ^~~~
Language: C++

using namespace std;

int main(){
    int N;
    cin>>N;
    int n=N;
    
    int sum=0;
    while (n>0) {
        sum+=n%10;
        n=n/10;
    }
    
    if (N%sum==0) {
        cout<<"Yes";
    }
    else{
        cout<<"No";
    }
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin>>N;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:15:9: error: 'cout' was not declared in this scope
   15 |         cout<<"Yes";
      |         ^~~~
a.cc:15:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:9: error: 'cout' was not declared in this scope
   18 |         cout<<"No";
      |         ^~~~
a.cc:18:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,a,t;
  a=0;
  cin>>n;
  t=n
  for (int i=0;i<9;i++){
    a+=n%10;
      n/=10;
  }
  if(a%t==0)
    cout<<"Yes"<<endl;
  else
    cout <<"No"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: expected ';' before 'for'
    7 |   t=n
      |      ^
      |      ;
    8 |   for (int i=0;i<9;i++){
      |   ~~~ 
a.cc:8:16: error: 'i' was not declared in this scope
    8 |   for (int i=0;i<9;i++){
      |                ^
Language: Java

import scala.io.StdIn

object Main extends App {
  def f(x:Int,t:Int):Int = {
    if(x == 0) t
    else f(x/10, t + (x % 10))
  }

  val n = StdIn.readLine.toInt

  val ans = if(n % f(n,0) == 0) "Yes" else "No"
  println(ans)
}

Compiler output:
Main.java:1: error: ';' expected
import scala.io.StdIn
                     ^
1 error
Language: C++

#include <iostream>
using namespace std;

int main() {
  int n, N = 0, ni, sum = 0;
  cin >> n;
  ni = n;
  for(n != 0) {
    N = n % 10;
    n /= 10;
    sum += N;
  }
  if(!(n % sum)) cout << "YES" << endl;
  else cout << "NO" << endl;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: expected ';' before ')' token
    8 |   for(n != 0) {
      |             ^
      |             ;
a.cc:13:3: error: expected primary-expression before 'if'
   13 |   if(!(n % sum)) cout << "YES" << endl;
      |   ^~
a.cc:12:4: error: expected ';' before 'if'
   12 |   }
      |    ^
      |    ;
   13 |   if(!(n % sum)) cout << "YES" << endl;
      |   ~~
a.cc:13:3: error: expected primary-expression before 'if'
   13 |   if(!(n % sum)) cout << "YES" << endl;
      |   ^~
a.cc:12:4: error: expected ')' before 'if'
   12 |   }
      |    ^
      |    )
   13 |   if(!(n % sum)) cout << "YES" << endl;
      |   ~~
a.cc:8:6: note: to match this '('
    8 |   for(n != 0) {
      |      ^
Language: C++

#include <iostream>
using namespace std;

int main() {
  int n, N = 0, sum = 0;
  for(N != 0) {
    N = n % 10;
    sum += N;
  }
  if(!(n % sum)) cout << "YES" << endl;
  else cout << "NO" << endl;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: expected ';' before ')' token
    6 |   for(N != 0) {
      |             ^
      |             ;
a.cc:10:3: error: expected primary-expression before 'if'
   10 |   if(!(n % sum)) cout << "YES" << endl;
      |   ^~
a.cc:9:4: error: expected ';' before 'if'
    9 |   }
      |    ^
      |    ;
   10 |   if(!(n % sum)) cout << "YES" << endl;
      |   ~~
a.cc:10:3: error: expected primary-expression before 'if'
   10 |   if(!(n % sum)) cout << "YES" << endl;
      |   ^~
a.cc:9:4: error: expected ')' before 'if'
    9 |   }
      |    ^
      |    )
   10 |   if(!(n % sum)) cout << "YES" << endl;
      |   ~~
a.cc:6:6: note: to match this '('
    6 |   for(N != 0) {
      |      ^
Language: C

#include<stdio.h>

int main(){
long n,ncpy;int sum=0;
scanf("%ld",&n);ncpy=n;
while(ncpy>0){
long tmp=ncpy%10;
sum+=tmp;
ncpy=(ncpy-tmp)/10;
}
if(n%sum==0)pus("Yes");
else puts("No");
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:13: error: implicit declaration of function 'pus'; did you mean 'puts'? [-Wimplicit-function-declaration]
   11 | if(n%sum==0)pus("Yes");
      |             ^~~
      |             puts
Language: Java

import java.util.*;
 
public class Main{
  public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    
    String N = sc.next();
    int sum = 0;
 
    for(int i = 0; i <= N.length(); i++){
      sum += Integer.parseInt(N.subString(i, i+1));
    }
    
    int total = Integer.parseInt(N);
    String output = null;
    
    output = (total % sum == 0) ? "Yes":"No";
    System.out.println(output);
  }
}

Compiler output:
Main.java:12: error: cannot find symbol
      sum += Integer.parseInt(N.subString(i, i+1));
                               ^
  symbol:   method subString(int,int)
  location: variable N of type String
1 error
Language: Java

import java.util.*;
 
public class Main{
  public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    
    String N = sc.next();
    int sum = 0;
 
    for(int i = 0; i <= N.length(); i++){
      sum += Integer.parseInt(i, i+1);
    }
    
    int total = Integer.parseInt(N);
    String output = null;
    
    output = (total % sum == 0) ? "Yes":"No";
    System.out.println(output);
  }
}

Compiler output:
Main.java:12: error: incompatible types: int cannot be converted to String
      sum += Integer.parseInt(i, i+1);
                              ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: Java

import java.util.*;
 
public class Main{
  public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    
    String N = sc.next();
    int sum = 0;
 
    for(int i = 0; i <= N.length; i++){
      sum += Integer.parse(i, i+1);
    }
    
    int total = Integer.parse(N);
    String output = null;
    
    output = (total % sum == 0) ? "Yes":"No";
    System.out.println(output);
  }
}

Compiler output:
Main.java:11: error: cannot find symbol
    for(int i = 0; i <= N.length; i++){
                         ^
  symbol:   variable length
  location: variable N of type String
Main.java:12: error: cannot find symbol
      sum += Integer.parse(i, i+1);
                    ^
  symbol:   method parse(int,int)
  location: class Integer
Main.java:15: error: cannot find symbol
    int total = Integer.parse(N);
                       ^
  symbol:   method parse(String)
  location: class Integer
3 errors
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    
    String N = sc.next();
    int intN = String.parseInt(N);
    int sum = 0;

    for(int i = 0; i <= 8; i++){
      sum += intN % 10;
      intN = intN / 10;
      if(intN == 0){
        break;
      }
    }
    String output = null;
    
    if(intN % sum == 0){
      output = "Yes";
    }
    else
    {
      output = "No";
    }
            
    System.out.println(output);
  }
}

Compiler output:
Main.java:9: error: cannot find symbol
    int intN = String.parseInt(N);
                     ^
  symbol:   method parseInt(String)
  location: class String
1 error
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    
    String N = sc.next();
    int intN = int.parseInt(N);
    int sum = 0;

    for(int i = 0; i <= 8; i++){
      sum += intN % 10;
      intN = intN / 10;
      if(intN == 0){
        break;
      }
    }
    String output = null;
    
    if(intN % sum == 0){
      output = "Yes";
    }
    else
    {
      output = "No";
    }
            
    System.out.println(output);
  }
}

Compiler output:
Main.java:9: error: class expected
    int intN = int.parseInt(N);
                   ^
Main.java:9: error: ';' expected
    int intN = int.parseInt(N);
                           ^
Main.java:9: error: not a statement
    int intN = int.parseInt(N);
                            ^
Main.java:9: error: ';' expected
    int intN = int.parseInt(N);
                             ^
4 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;

    for(i = 0; i <= 8; i++){
      sum += N % 10;
      N = N / 10;
      if(N == 0){
        break;
      }
    }
    String output = null;
    
    if(N % sum == 0){
      output = "Yes";
    }
    else
    {
      output = "No";
    }
            
    System.out.println(output);
  }
}

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

import java.util.*;

public class Main{
  public static void main(){
    
    Scanner sc = new Scanner(System.in);
    
    int N = sc.nextInt();
    int sum = 0;

    while(true){
      sum += N % 10;
      N = N / 10;
      if(N=0){
        break;
      }
    }
    String output = null;
    
    if(N % sum == 0){
      output = "Yes";
    }
    else
    {
      output = "No";
    }
    
        
    System.out.println(output);
  }
}

    
      
    

Compiler output:
Main.java:14: error: incompatible types: int cannot be converted to boolean
      if(N=0){
          ^
1 error
Language: Java

import java.util.*;

public class Main{
  public static void main(){
    
    Scanner sc = new Scanner(System.in);
    
    int N = sc.nextInt();
    int 
    int sum = 0;

    while(true){
      sum += N % 10;
      N = N / 10;
      if(N=0){
        break;
      }
    }
    String output = null;
    
    if(N % sum == 0){
      output = "Yes";
    }
    else
    {
      output = "No";
    }
    
        
    System.out.println(output);
  }
}

    
      
    

Compiler output:
Main.java:9: error: not a statement
    int 
    ^
Main.java:9: error: ';' expected
    int 
       ^
2 errors
Language: C++

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

int main(){
  int N;　
  int a; 
  int b = 0;
  
  cin >> N;
  for(int i = 0;N > 10;){
  a = N % 10;
  b =b + a;
  N = N / 10;
  }
  if(N % b == 0){
    cout << "Yes" <<endl;
  }
    else {
      cout << "No" <<endl;
    }
  }

Compiler output:
a.cc:5:9: error: extended character 　 is not valid in an identifier
    5 |   int N;　
      |         ^
a.cc: In function 'int main()':
a.cc:5:9: error: '\U00003000' was not declared in this scope
    5 |   int N;　
      |         ^~
a.cc:11:3: error: 'a' was not declared in this scope
   11 |   a = N % 10;
      |   ^
Language: C++

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

int main(){
  int N;　
  int a; 
  int b = 0;
  
  cin >> N;
  for(int i = 0;N > 10;){
  a = N % 10;
  b += a;
  N = N / 10;
  }
  if(N % b == 0){
    cout << "Yes" <<endl;
  }
    else {
      cout << "No" <<endl;
    }
  }

Compiler output:
a.cc:5:9: error: extended character 　 is not valid in an identifier
    5 |   int N;　
      |         ^
a.cc: In function 'int main()':
a.cc:5:9: error: '\U00003000' was not declared in this scope
    5 |   int N;　
      |         ^~
a.cc:11:3: error: 'a' was not declared in this scope
   11 |   a = N % 10;
      |   ^
Language: C++

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

int main(){
  int N;　
  int a; 
  int b = 0;
  
  cin >> N;
  for(int i = 0;N < 10;){
  a = N % 10;
  b += a;
  N = N / 10;
  }
  if(N % b == 0){
    cout << "Yes" <<endl;
  }
    else {
      cout << "No" <<endl;
    }
  }

Compiler output:
a.cc:5:9: error: extended character 　 is not valid in an identifier
    5 |   int N;　
      |         ^
a.cc: In function 'int main()':
a.cc:5:9: error: '\U00003000' was not declared in this scope
    5 |   int N;　
      |         ^~
a.cc:11:3: error: 'a' was not declared in this scope
   11 |   a = N % 10;
      |   ^
Language: C++

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

int main(){
  int N,A;　
  int a; 
  int b = 0;
  
  cin >> N;
  for(int i = 0;N < 10;){
  a = N % 10;
  b += a;
  N = N / 10;
  }
  if(A % b == 0){
    cout << "Yes" <<endl;
  }
    else {
      cout << "No" <<endl;
    }
  }

Compiler output:
a.cc:5:11: error: extended character 　 is not valid in an identifier
    5 |   int N,A;　
      |           ^
a.cc: In function 'int main()':
a.cc:5:11: error: '\U00003000' was not declared in this scope
    5 |   int N,A;　
      |           ^~
a.cc:11:3: error: 'a' was not declared in this scope
   11 |   a = N % 10;
      |   ^