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

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

#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384


int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} 
int gcd(int a,int b){int c;while(b!=0){c=a%b;a=b;b=c;}return a;}    //最大公約数
int lcm(int a,int b){int c=gcd(a,b);a/=c;return a*b;}     //最小公倍数
int nCr(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;} //コンビネーション
int nHr(int a,int b){return nCr(a+b-1,b);}       // 重複組み合わせ
int fact(int a){int i,r=1;for(i=1;i<=a;i++){r*=i;}return r;}  //階乗
int pow(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=a;}return r;} // a~bまでの階乗
int dsum(int x){int r=0;while(x){r+=(x%10);x/=10;}return r;}   //数字の各位の和
int dsumb(int x,int b){int r=0;while(x){r+=(x%b);x/=b;}return r;}  // b進数の各位の和？
int sankaku(int x){return ((1+x)*x)/2;} //三角数 xまでの和

//以下long long ver
long long llmax(long long a,long long b){if(a>b){return a;}return b;}
long long llmin(long long a,long long b){if(a<b){return a;}return b;}
long long llzt(long long a,long long b){return llmax(a,b)-llmin(a,b);}
long long llround(long long a,long long b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;}
long long llceil(long long a,long long b){if(a%b==0){return a/b;}return (a/b)+1;}
long long llgcd(long long a,long long b){long long c;while(b!=0){c=a%b;a=b;b=c;}return a;}
long long lllcm(long long a,long long b){long long c=llgcd(a,b);a/=c;return a*b;}
long long llnCr(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;}
long long llnHr(long long a,long long b){return llnCr(a+b-1,b);}
long long llfact(long long a){long long i,r=1;for(i=1;i<=a;i++){r*=i;}return r;}
long long llpow(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=a;}return r;}
long long lldsum(long long x){long long r=0;while(x){r+=(x%10);x/=10;}return r;}
long long lldsumb(long long x,long long b){long long r=0;while(x){r+=(x%b);x/=b;}return r;}
long long llsankaku(long long x){return ((1+x)*x)/2;}

//double
double dbmax(double a,double b){if(a>b){return a;}return b;}
double dbmin(double a,double b){if(a<b){return a;}return b;}
double dbzt(double a,double b){return dbmax(a,b)-dbmin(a,b);}


typedef pair<int, int> ii;
typedef long long ll;
typedef vector<ll> vll;
typedef pair<ll,ll> pll;
#define forr(i,a,b) ; for(int i=(a); i<(b); i++)
#define clean(arr,val) memset(arr,val,sizeof(arr))
#define forn(i,n) forr(i,0,n)
#define PB push_back
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<pll> vpll;
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};

 
/*CODE START HERE*/
int main() {
  int n;
  cin >> n;
  int a = dsum(n);
  cout << (n%a = 0 ? "Yes":"No") << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:63:13: error: lvalue required as left operand of assignment
   63 |   cout << (n%a = 0 ? "Yes":"No") << endl;
      |            ~^~
a.cc: At global scope:
a.cc:65:1: error: expected declaration before '}' token
   65 | }
      | ^
Language: C++

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

#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384


int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} 
int gcd(int a,int b){int c;while(b!=0){c=a%b;a=b;b=c;}return a;}    //最大公約数
int lcm(int a,int b){int c=gcd(a,b);a/=c;return a*b;}     //最小公倍数
int nCr(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;} //コンビネーション
int nHr(int a,int b){return nCr(a+b-1,b);}       // 重複組み合わせ
int fact(int a){int i,r=1;for(i=1;i<=a;i++){r*=i;}return r;}  //階乗
int pow(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=a;}return r;} // a~bまでの階乗
int dsum(int x){int r=0;while(x){r+=(x%10);x/=10;}return r;}   //数字の各位の和
int dsumb(int x,int b){int r=0;while(x){r+=(x%b);x/=b;}return r;}  // b進数の各位の和？
int sankaku(int x){return ((1+x)*x)/2;} //三角数 xまでの和

//以下long long ver
long long llmax(long long a,long long b){if(a>b){return a;}return b;}
long long llmin(long long a,long long b){if(a<b){return a;}return b;}
long long llzt(long long a,long long b){return llmax(a,b)-llmin(a,b);}
long long llround(long long a,long long b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;}
long long llceil(long long a,long long b){if(a%b==0){return a/b;}return (a/b)+1;}
long long llgcd(long long a,long long b){long long c;while(b!=0){c=a%b;a=b;b=c;}return a;}
long long lllcm(long long a,long long b){long long c=llgcd(a,b);a/=c;return a*b;}
long long llnCr(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;}
long long llnHr(long long a,long long b){return llnCr(a+b-1,b);}
long long llfact(long long a){long long i,r=1;for(i=1;i<=a;i++){r*=i;}return r;}
long long llpow(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=a;}return r;}
long long lldsum(long long x){long long r=0;while(x){r+=(x%10);x/=10;}return r;}
long long lldsumb(long long x,long long b){long long r=0;while(x){r+=(x%b);x/=b;}return r;}
long long llsankaku(long long x){return ((1+x)*x)/2;}

//double
double dbmax(double a,double b){if(a>b){return a;}return b;}
double dbmin(double a,double b){if(a<b){return a;}return b;}
double dbzt(double a,double b){return dbmax(a,b)-dbmin(a,b);}


typedef pair<int, int> ii;
typedef long long ll;
typedef vector<ll> vll;
typedef pair<ll,ll> pll;
#define forr(i,a,b) ; for(int i=(a); i<(b); i++)
#define clean(arr,val) memset(arr,val,sizeof(arr))
#define forn(i,n) forr(i,0,n)
#define PB push_back
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<pll> vpll;
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};

 
/*CODE START HERE*/
int main() {
  int n;
  cin >> n;
  a = dsum(n);
  cout << (n%a = 0 ? "Yes":"No") << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:62:3: error: 'a' was not declared in this scope
   62 |   a = dsum(n);
      |   ^
a.cc: At global scope:
a.cc:65:1: error: expected declaration before '}' token
   65 | }
      | ^
Language: C++

/*
      author  : nishi5451
      created : 14.08.2020 19:25:35
*/

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<n; i++)
typedef long long ll;


int main(){
    ll n;
    cin >> n;
    string s = to_string(n);
    ll sn = 0
    rep(i,int(s.size())){
        sn += s[i]-'0';
    }
    if(n%sn==0) cout << "Yes" << endl;
    else cout << "No" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: expected ',' or ';' before 'for'
    8 | #define rep(i,n) for(int i=0; i<n; i++)
      |                  ^~~
a.cc:17:5: note: in expansion of macro 'rep'
   17 |     rep(i,int(s.size())){
      |     ^~~
a.cc:17:9: error: 'i' was not declared in this scope
   17 |     rep(i,int(s.size())){
      |         ^
a.cc:8:31: note: in definition of macro 'rep'
    8 | #define rep(i,n) for(int i=0; i<n; i++)
      |                               ^
Language: C++

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

int main() {
  string s;
  cin >> s;
  int n = stoi(s) ;
  vector <int> a(s.size());
  int sum=0 ;
  for (int i=0 ; i< s.size() ; i++){
    a.at(i)= atoi(s.at(i));
    sum += a.at(i) ;
  }
  cout << (sum%n==0 ? "Yes" : "No") << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:23: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
   11 |     a.at(i)= atoi(s.at(i));
      |                   ~~~~^~~
      |                       |
      |                       __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
                 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() {
  string s;
  cin >> s;
  int n = stoi(s) ;
  vector <int> a(s.size());
  int sum=0 ;
  for (int i=0 ; i< s.size() ; i++){
    a.at(i)= ctoi(s.at(i));
    sum += a.at(i) ;
  }
  cout << (sum%n==0 ? "Yes" : "No") << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: 'ctoi' was not declared in this scope; did you mean 'atoi'?
   11 |     a.at(i)= ctoi(s.at(i));
      |              ^~~~
      |              atoi
Language: C++

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

int main() {
  string s;
  cin >> s;
  vector <int> a(s.size());
  int sum=0 ;
  for (int i=0 ; i< s.size() ; i++){
    a.at(i)= stoi(s.at(i));
    sum += a.at(i) ;
  }
  cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   10 |     a.at(i)= stoi(s.at(i));
      |              ~~~~^~~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:4164:3: note: candidate: 'int std::__cxx11::stoi(const std::string&, std::size_t*, int)'
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4164:22: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::string&' {aka 'const std::__cxx11::basic_string<char>&'}
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:4432:3: note: candidate: 'int std::__cxx11::stoi(const std::wstring&, std::size_t*, int)'
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4432:23: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::wstring&' {aka 'const std::__cxx11::basic_string<wchar_t>&'}
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~~^~~~~
Language: C

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

#define gcd(a,b)		__gcd(a,b)
#define lcm(a,b)		(a*b)/gcd(a,b)
#define ff              first
#define ss              second
#define int             long long
#define pb              emplace_back
#define mp              make_pair
#define pii             pair<int,int>
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define mod             1000000007
#define inf             INT64_MAX
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define w(x)            int x; cin>>x; while(x--)
#define all(x)			x.begin(),x.end()
#define digits(x)		floor(log10(x))+1
#define FIO				ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)

class dsu {
private:
	int *id;
	int* sz;

	int root(int i) {
		while (i != id[i]) {
			id[i] = id[id[i]];
			i = id[i];
		}
		return i;
	}
public:
	int n;
	dsu(int v) {
		n = v;
		id = new int[n];
		sz = new int[n];

		for (int i = 0; i < n; i++) {
			id[i] = i;
			sz[i] = 0;
		}
	}

	bool find(int p , int q) {
		return root(p) == root(q);
	}

	void join(int p , int q) {
		int i = root(p);
		int j = root(q);
		if (i == j) {
			return;
		}
		if (sz[i] < sz[j]) {
			id[i] = j ;
			sz[j] += sz[i];
		}
		else {
			id[j] = i;
			sz[i] += sz[j];
		}
	}
};

class BIT {
private:
	int* FT;
	int n;
public:
	void updateBIT(int index , int val) {
		index += 1;
		while (index <= n) {
			FT[index] += val;
			index += (index & (-index));
		}
	}

	int getSum(int index) {
		index += 1;
		int sum = 0 ;
		while (index > 0) {
			sum += FT[index];
			index -= (index & (-index));
		}
		return sum;
	}


	BIT(int* a , int v) {
		n = v ;
		FT = new int[n + 1];
		for (int i = 1 ; i <= n ; i++) {
			FT[i] = 0 ;
		}
		for (int i = 0 ; i < n ; i++) {
			updateBIT(i, a[i]);
		}
	}
};

int nCr(int n , int r ) {
	int p = 1, k = 1;

	if (n - r < r ) {
		r = n - r;
	}
	if (r != 0) {
		while (r != 0) {
			p *= n ;
			k *= r ;
			int m = __gcd(p, k);
			p /= m;
			k /= m;
			n--;
			r--;
		}
	}
	else {
		p = 1;
	}
	return p ;
}

int modPower(int x, int y , int p) {
	//Used to calculate (x^y)%p
	int res = 1;
	if (y == 0) {
		return 1;
	}

	x = x % p;
	if (x == 0) {
		return 0  ;
	}

	while (y > 0) {
		if (y & 1) {
			res = (res * x) % p;
		}

		y >>= 1;
		x = (x * x) % p;
	}
	return res ;

}

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

int32_t main() {
	FIO;


	int n ;
	cin >> n ;


	int val = sum(n);


	if ( n % val == 0) {
		cout << "Yes";
	}
	else {
		cout << "No";
	}







	return 0;
}


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

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

#define gcd(a,b)		__gcd(a,b)
#define lcm(a,b)		(a*b)/gcd(a,b)
#define ff              first
#define ss              second
#define int             long long
#define pb              emplace_back
#define mp              make_pair
#define pii             pair<int,int>
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define mod             1000000007
#define inf             INT64_MAX
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define w(x)            int x; cin>>x; while(x--)
#define all(x)			x.begin(),x.end()
#define digits(x)		floor(log10(x))+1
#define FIO				ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)

class dsu {
private:
	int *id;
	int* sz;

	int root(int i) {
		while (i != id[i]) {
			id[i] = id[id[i]];
			i = id[i];
		}
		return i;
	}
public:
	int n;
	dsu(int v) {
		n = v;
		id = new int[n];
		sz = new int[n];

		for (int i = 0; i < n; i++) {
			id[i] = i;
			sz[i] = 0;
		}
	}

	bool find(int p , int q) {
		return root(p) == root(q);
	}

	void join(int p , int q) {
		int i = root(p);
		int j = root(q);
		if (i == j) {
			return;
		}
		if (sz[i] < sz[j]) {
			id[i] = j ;
			sz[j] += sz[i];
		}
		else {
			id[j] = i;
			sz[i] += sz[j];
		}
	}
};

class BIT {
private:
	int* FT;
	int n;
public:
	void updateBIT(int index , int val) {
		index += 1;
		while (index <= n) {
			FT[index] += val;
			index += (index & (-index));
		}
	}

	int getSum(int index) {
		index += 1;
		int sum = 0 ;
		while (index > 0) {
			sum += FT[index];
			index -= (index & (-index));
		}
		return sum;
	}


	BIT(int* a , int v) {
		n = v ;
		FT = new int[n + 1];
		for (int i = 1 ; i <= n ; i++) {
			FT[i] = 0 ;
		}
		for (int i = 0 ; i < n ; i++) {
			updateBIT(i, a[i]);
		}
	}
};

int nCr(int n , int r ) {
	int p = 1, k = 1;

	if (n - r < r ) {
		r = n - r;
	}
	if (r != 0) {
		while (r != 0) {
			p *= n ;
			k *= r ;
			int m = __gcd(p, k);
			p /= m;
			k /= m;
			n--;
			r--;
		}
	}
	else {
		p = 1;
	}
	return p ;
}

int modPower(int x, int y , int p) {
	//Used to calculate (x^y)%p
	int res = 1;
	if (y == 0) {
		return 1;
	}

	x = x % p;
	if (x == 0) {
		return 0  ;
	}

	while (y > 0) {
		if (y & 1) {
			res = (res * x) % p;
		}

		y >>= 1;
		x = (x * x) % p;
	}
	return res ;

}

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

int32_t main() {
	FIO;


	int n ;
	cin >> n ;


	int val = sum(n);

	if (val % n == 0) {
		cout << "Yes";
	}
	else {
		cout << "No";
	}







	return 0;
}


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

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

int main(){
    long n;
    cin>>n;
    long temp = n;
    int s=0;
    while(temp>0){
        s+=(temp%10);
        temp/=10;
    }
    if(n%s)
        cout<<"NO"<<endl;
    else cout<<"YES"<<endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |     cin>>n;
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:16:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |         cout<<"NO"<<endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:16:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   16 |         cout<<"NO"<<endl;
      |                     ^~~~
      |                     std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:17:10: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |     else cout<<"YES"<<endl;
      |          ^~~~
      |          std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:17:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   17 |     else cout<<"YES"<<endl;
      |                       ^~~~
      |                       std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: Java

import java.util.*;

public class Main {
  
  public static void main(String[] args) {
    
    Scanner scan = new Scanner(System.in);
    int N = scan.nextInt();
    String str = Integer.toString(i);
    int sum = 0;
    
    for (int i = 0; i < str.length(); i++) {
      char ch = str.charAt(i);
      int c = Integer.parseInt(String.valueOf(ch));
      sum = sum + c;
    }

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

Compiler output:
Main.java:9: error: cannot find symbol
    String str = Integer.toString(i);
                                  ^
  symbol:   variable i
  location: class Main
1 error
Language: C++

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

int main() {
  string N;
  cin >> N;
  int M, n, S;
  M=int(N);
  n=N.size();
  S=0;
  for (int i=0; i<n; i++) {
    S=S+int(N.at(i))-48;
  }
  if ((M-48)%S==0) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: invalid cast from type 'std::string' {aka 'std::__cxx11::basic_string<char>'} to type 'int'
   11 |   M=int(N);
      |     ^~~~~~
Language: C++

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

int main() {
  string N;
  cin >> N;
  int M, n, S;
  M=int(N)
  n=N.size();
  S=0;
  for (int i=0; i<n; i++) {
    S=S+int(N.at(i))-48;
  }
  if ((M-48)%S==0) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: invalid cast from type 'std::string' {aka 'std::__cxx11::basic_string<char>'} to type 'int'
   11 |   M=int(N)
      |     ^~~~~~
Language: C++

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

int main() {
  string N;
  cin >> N;
  int n, S;
  n=N.size();
  S=0;
  for (int i=0; i<n; i++) {
    S=S+int(N.at(i))-48;
  }
  if ((int(N)-48)%S==0) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:8: error: invalid cast from type 'std::string' {aka 'std::__cxx11::basic_string<char>'} to type 'int'
   16 |   if ((int(N)-48)%S==0) {
      |        ^~~~~~
Language: C++

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

int main() {
  string N;
  cin >> N;
  int n, S;
  n=N.size();
  S=0;
  for (int i=0; i<n; i++) {
    S=S+int(S.at(i))-48;
  }
  if ((int(N)-48)%S==0) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:15: error: request for member 'at' in 'S', which is of non-class type 'int'
   14 |     S=S+int(S.at(i))-48;
      |               ^~
a.cc:16:8: error: invalid cast from type 'std::string' {aka 'std::__cxx11::basic_string<char>'} to type 'int'
   16 |   if ((int(N)-48)%S==0) {
      |        ^~~~~~
Language: Java

/**
 * coding: utf-8
 * Copyright (C) 2020 Matsuda.Hironobu. All Rights Reserved.
 * Code for 'AtCoder Beginner Contest 101-B'
 * 2020/07/14
 */
import java.util.Scanner;

/**
 * @author Matsuda.Hironobu
 */
public class Abc101B {
	/**
	 * @param args 起動時引数(なにも渡さない)
	 */
	public static void main(String[] args) {
		// 標準入力からのデータを関数に渡す
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		s.close();
		
		System.out.println(digitSums(n));
	}

	// 入力からのデータintを受け取り、結果をStringとして返す
	public static String digitSums(int n) {
		String si = Integer.toString(n);
		
		int s = 0;
		for(int i = 0; i < si.length(); i++) {
			s += Integer.parseInt(si.substring(i, i + 1));
		}
		
		if( n % s == 0) {
			return "Yes";
		} else {
			return "No";
		}
	}
}


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

#include<bits/stdc++.h>
#include<cstdlib>
#include<cmath>
using namespace std;
int main(){
  int A; cin>>A;
  int N=0;
  int B=10;
  int C=1;
  while(A/B=!=0){
    N+=(A%B)/C;
    A-=A%B;
    B*=10;
    C*=10;
  }
  if(A/N==0)
    cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: expected primary-expression before '!=' token
   10 |   while(A/B=!=0){
      |             ^~
Language: C++

/****************************
/////  Shubham Singhal
/////  LNMIIT
*****************************/
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp> 
// #include <ext/pb_ds/tree_policy.hpp> 
// #include <functional> 
// using namespace __gnu_pbds;
#define ff first
#define ss second
#define mp make_pair
#define pb push_back
#define ppb pop_back
#define pf push_front
#define ppf pop_front
#define eb emplace_back
#define lwr lower_bound
#define upr upper_bound
#define pq priority_queue
#define umap unordered_map
#define rep(i,n) for(i=0; i<n;i++)
#define repp(i,a,n) for(i=a; i<n;i++)
#define precise(x) cout<<fixed<<setprecision(x)
#define all(x) x.begin(),x.end()
#define lcm(a,b) (a*b)/__gcd(a,b)
#define prn(x) cout<<x<<"\n"
#define prn2(x, y) cout<<x<<" "<<y<<"\n"
#define prn3(x, y, z) cout<<x<<" "<<y<<" "<<z<<"\n"
#define prn4(x, y, z, a) cout<<x<<" "<<y<<" "<<z<<" "<<a<<"\n"
#define prnv(x) for(auto i:x) cout<<i<<" "; cout<<"\n"
#define MOD 1000000007
#define MaX 300005
using namespace std;

 
typedef unsigned long long ull;
typedef long long ll;
typedef double ld;
typedef pair<int, int> pii;
typedef pair<ll, int> pli;
typedef pair<int, ll> pil;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd; 
typedef vector<int> vi;
typedef vector<long> vl;
typedef vector<char> vc;
typedef vector<ll> vll;
typedef vector<bool> vb;
typedef vector<double> vd;
typedef vector<string> vs;
typedef vector<pii> vpii;
typedef vector<pil> vpil;
typedef vector<pli> vpli;
typedef vector<pll> vpll;
const long long INF64 = 1e18;
clock_t time_p=clock();
void time()
{
    time_p=clock()-time_p;
    cerr<<"Time Taken : "<<(float)(time_p)/CLOCKS_PER_SEC<<"\n";
}
void doc()
{
   	freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
}
void fast()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);cout.tie(NULL);
}
// typedef tree<int, null_type, less<int>, rb_tree_tag, 
//              tree_order_statistics_node_update> 
//     new_data_set; 
bool isprime(ll n) 
{ 
    if (n <= 1) 
        return false; 
    if (n <= 3) 
        return true; 
    if (n % 2 == 0 || n % 3 == 0) 
        return false; 
  
    for (ll i = 5; i * i <= n; i = i + 6) 
        if (n % i == 0 || n % (i + 2) == 0) 
            return false; 
    return true; 
}
ll fun(n)
{
	ll ret=0;
	while(n)
	{
		ret+=(n%10);
		n/=10;
	}
	return ret;
}
int main()
{
	ll n;
	cin>>n;
	ll x=fun(n);
	cout<<(x%n==0 ? "Yes":"No");
}





Compiler output:
a.cc:90:8: error: 'n' was not declared in this scope; did you mean 'yn'?
   90 | ll fun(n)
      |        ^
      |        yn
a.cc: In function 'int main()':
a.cc:104:17: error: 'fun' cannot be used as a function
  104 |         ll x=fun(n);
      |              ~~~^~~
Language: C++

#include <math.h>
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (int)(n); ++i)

int main() {
	int n; cin >> n;
	string s=to_string(n);
	int S=0;
	rep(i,s.size()) {
		S+=(s.back()-'0');
		s-=s.back();
	}
	if(n%S==0) cout << "Yes" << endl;
	else cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:18: error: no match for 'operator-=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
   12 |                 s-=s.back();
      |                 ~^~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, from, to) for (int i = from; i < (to); ++i)
#define mp(x,y) make_pair(x,y)
#define all(x) (x).begin(),(x).end()
#define sz(x) (int)(x).size()
using ll = long long;
using vin=vector<int>;
using vll=vector<ll>;
using P = pair<int, int>;
const int inf=1e9+7;
const ll INF=1e18;
template <typename T> void chmin(T &a, T b) { a = min(a, b); }
template <typename T> void chmax(T &a, T b) { a = max(a, b); }

int main() {
  int n;
  cin>>n;
  int s=0;
  for(int i=10;i>=0;i--){
    int c=pow(10,i);
    s+=n/c;
    //cout<<s<<endl;
    n-=n/c*c;
    //cout<<n<<endl;
  }
  if(v%s==0) cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
 // cout<<s<<endl;
}










Compiler output:
a.cc: In function 'int main()':
a.cc:28:6: error: 'v' was not declared in this scope
   28 |   if(v%s==0) cout<<"Yes"<<endl;
      |      ^
Language: Java

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
　　　//入力表示
		int N = sc.nextInt();
		int sum=0;
		int ten=N;
		
      //位ごとに足していく
		while(ten>0) {
			sum+=ten %10;
			ten/=10;
		}
      
      //Nを足しと答えと割って余りが0ならyesと表示
		System.out.println(N%sum==0 ? "Yes":"No");
		
	}
}

Compiler output:
Main.java:9: error: illegal character: '\u3000'
???//????
^
Main.java:9: error: illegal character: '\u3000'
???//????
 ^
Main.java:9: error: illegal character: '\u3000'
???//????
  ^
3 errors
Language: C++

#include <iostream>
#include <string>

void main(void)
{
    using namespace std;
    string n;
    cin >> n;

    int s = 0;
    for(int i = 0; i < n.length(); ++i) {
        s += (n.at(i) - '0');
    }
    cout << (std::stoi(n) % s == 0 ? "Yes" : "No") << endl;    
}

Compiler output:
a.cc:4:1: error: '::main' must return 'int'
    4 | void main(void)
      | ^~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i=0;i<(n);i++)
using namespace std;
using ll = long long;
using P = pair<int,int>;
 
 
int main() {
    ll n;
    cin >> n;
    int n1=n;
    int sn=0;
    while(true){
        if(n/10==0){
            sn+=n;
            break;
        }
        else{
            sn+=n%10;
            sn/=10;
        }
    }
    if(n1%an==0) cout << "Yes" << endl;
    else cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:11: error: 'an' was not declared in this scope; did you mean 'sn'?
   23 |     if(n1%an==0) cout << "Yes" << endl;
      |           ^~
      |           sn
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define eps 1e-9
#define maxp 1000400
#define mod 1000000007
#define pi 3.141592653589793238
#define sin(s) scanf("%lld",&s);
#define sout(s) printf("%lld\n",s);
#define in(s) cin>>s
#define in2(a,b) cin>>a>>b
#define in3(a,b,c) cin>>a>>b>>c
#define vll vector<ll>
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define endl '\n'
#define sp ' '
#define gear_change ios_base::sync_with_stdio(false),cin.tie(0)
#define nfl(i,n) for(i=0;i<n;i++)
#define sfl(i,s,e) for(i=s;i<e;i++)
#define ufl(i,n) for(i=n-1;i>=0;i--)
ll power(ll x,ll y){
    ll ret=1;
    while(y>0){
        if(y&1)
            ret=(ret*x);
        y/=2;
        x=(x*x);
    }
    return ret;
}
ll get(ll n){
	ll ret=0;
	while(n){
		ans+=n%10;
		n/=10;
	}
	return ans;
}
void solve(){
	ll n;
	cin>>n;
	ll sm=get(n);
	if(sm%n==0){
		cout<<"Yes\n";
	}else{
		cout<<"No\n";
	}
}	
int main(){
	gear_change;
	ll test=1;
	// in(test);
	while(test--){
		solve();
	}
}	


Compiler output:
a.cc: In function 'long long int get(long long int)':
a.cc:38:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   38 |                 ans+=n%10;
      |                 ^~~
      |                 abs
a.cc:41:16: error: 'ans' was not declared in this scope; did you mean 'abs'?
   41 |         return ans;
      |                ^~~
      |                abs
Language: C++

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define rep2(i,n) for(int i=0;i<=n;i++)
#define repr(i,a,n) for(int i=a;i<n;i++)
#define all(a) a.begin(),a.end()
#define P pair<long long,long long>
#define uni(e) e.erase(unique(e.begin(),e.end()),e.end())
#define double long double
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
int INF=1e10;
int MOD=1e9+7;
template<class T> void out(T a){cout<<a<<'\n';}
template<class T> void yesno(T b){if(b)out("yes");else out("no");}
template<class T> void YesNo(T b){if(b)out("Yes");else out("No");}
template<class T> void YESNO(T b){if(b)out("YES");else out("NO");}
template<class T> void noyes(T b){if(b)out("no");else out("yes");}
template<class T> void NoYes(T b){if(b)out("No");else out("Yes");}
template<class T> void NOYES(T b){if(b)out("NO");else out("YES");}
int keta(int a){
  double b=a;
  b=log10(b);
  int c=b;
  return c+1;
}
int kurai(int a,int b){
  int m=pow(10,b),n=pow(10,b-1);
  return (a%m)/n;
}
int ketawa(int a){
  int k=0;
  rep(i,keta(a)){
  k+=kurai(a,i+1);
  }
  return k;
}
int gcd(int a,int b){
  if(a%b==0)
    return b;
  return gcd(b,a%b);
}
int lcm(int a,int b){
    return a/gcd(a,b)*b;
}
int mid(int a,int b,int c){
  vector<int> k(3);
  k[0]=a;k[1]=b;k[2]=c;
  sort(all(k));
  return k[1];
}
bool sosuu(int a){
  bool b=1;
  if(a<=1)
    return 0;
  else{
  rep1(i,sqrt(a)-1){
  if(a%(i+1)==0)
  b=0;
  }
  return b;
  }
}
int modpow(int a,int b,int m=MOD){
 if(!b)return 1; if(b&1)return modpow(a,b-1,m)*a%m;
 int memo = modpow(a,b>>1,m);
 return memo*memo%m;
}
int fact_mod(int n) {
    int f=1; 
for(int i=2;i<n+1;i++) f=f*(i%MOD)% MOD;
    return f;
}
int mod_pow(int x,int n) {
    int res=1;
    while(n>0){
        if(n&1) res=(res*x)%MOD; 
        x=(x*x)%MOD;        
n>>=1; 
    }
    return res;
}
int c_mod(int n, int r) {
    if(r>n-r) r=n-r;
    if(r==0) return 1;
    int a=1;
    rep(i,r) 
a=a*((n-i)%MOD)%MOD;
    int b=mod_pow(fact_mod(r), MOD-2);
    return (a%MOD)*(b%MOD)%MOD;
}
signed main(){
  int a;
  cin>>a;
  YesNo(!(a%ketawa(a)))
}

Compiler output:
a.cc: In function 'int main()':
a.cc:98:24: error: expected ';' before '}' token
   98 |   YesNo(!(a%ketawa(a)))
      |                        ^
      |                        ;
   99 | }
      | ~
Language: Java

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();

		int num = N;

	int s =0;
	while(num != 0) {
		s += num % 10;
		num /= 10;
	}

	System.out.println(N % s == 0? "Yes":"No");
		｝
}


Compiler output:
Main.java:19: error: illegal character: '\uff5d'
		?
		^
Main.java:20: error: reached end of file while parsing
}
 ^
2 errors
Language: Java

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();

		int num = N;

	int s =0;
	while(num != 0) {
		s += num % 10;
		num /= 10;
	}

	System.out.println(N % s == 0? "Yes":"No");
		｝
}


Compiler output:
Main.java:17: error: illegal character: '\uff5d'
		?
		^
Main.java:18: error: reached end of file while parsing
}
 ^
2 errors
Language: Java

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
	Scanner scanner = new Scanner(System.in);
	int N = scanner.nextInt();

	int num = N;
	int s =0;

	while(num !=0) {
		s += num % 10;
		num /= 10;



	}



	System.out.println(N % s == 0? "yes":"no");
｝
	}

Compiler output:
Main.java:22: error: illegal character: '\uff5d'
?
^
Main.java:23: error: reached end of file while parsing
	}
	 ^
2 errors
Language: Java

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
	Scanner scanner = new Scanner(System.in);
	int N = scanner.nextInt();

	int num = N;
	int s =0;

	while(num !=0) {
		s += num % 10;
		num /= 10;



	}


}
	System.out.println(N % s == 0? "yes":"no");
}

Compiler output:
Main.java:21: error: <identifier> expected
	System.out.println(N % s == 0? "yes":"no");
	                  ^
Main.java:21: error: <identifier> expected
	System.out.println(N % s == 0? "yes":"no");
	                    ^
2 errors
Language: Java

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
	Scanner scanner = new Scanner(System.in);
	int N = scanner.nextInt();

	int num = N;
	int s =0;

	while(num !=0) {
		s += num % 10;
		num /= 10;



	}

	System.out.println(N % s == 0? "yes":"no");

}
}

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

#include <stdio.h>
int main(void){
    double n,a=0,m;

    scanf("%lf",&n);
    m=n;
    while(m>0){
        a+=(int)n%10;
        m/=10;
    }
    if((int)n%a==0)
        printf("Yes\n");
    else
        printf("No\n");
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:14: error: invalid operands to binary % (have 'int' and 'double')
   11 |     if((int)n%a==0)
      |        ~~~~~~^
      |        |
      |        int
Language: C

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


Compiler output:
main.c:16:5: error: expected identifier or '(' before 'return'
   16 |     return 0;
      |     ^~~~~~
main.c:17:1: error: expected identifier or '(' before '}' token
   17 | }
      | ^
Language: C

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


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

#include <cstdio>
int main(void)
{
    int N,n=0;
    scanf("%d",&N);
    int s=N;
    while (s>0){
        n+=s%10;
        s/=10;
    }
    if (N%n==0)
        printf("Yes\n");
    else
        printf("No\n");
    }
    return 0;
}


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

#include<bits/stdc++.h>

using namespace std;
using ll=long long;
#define rep(i, n) for(int i = 0; i < n; i++)
#define rep2(i, a, n) for(int i = (a); i < (n); i++)

int main(){
  cin.tie(nullptr);ios_base::sync_with_stdio(false);
  string n;cin>>n;
  int sum=0;
  rep(i,n.size()){
    sum+=stoi(n[i]);
  }
  cout<<(stoi(n)%sum?"Yes":"No")<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:14: error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   13 |     sum+=stoi(n[i]);
      |          ~~~~^~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:4164:3: note: candidate: 'int std::__cxx11::stoi(const std::string&, std::size_t*, int)'
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4164:22: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::string&' {aka 'const std::__cxx11::basic_string<char>&'}
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:4432:3: note: candidate: 'int std::__cxx11::stoi(const std::wstring&, std::size_t*, int)'
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4432:23: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::wstring&' {aka 'const std::__cxx11::basic_string<wchar_t>&'}
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~~^~~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include<stdio.h>
#include<string>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
vector<int> input(int n) {
    vector<int> vec(n);
    for (int i = 0; i < n; i++) {
        cin >> vec.at(i);
    }
    return vec;
}
void output(vector<int> vec) {
    for (int i = 0; i < vec.size(); i++) {
        cout << vec[i] << " ";
    }
    return;
}
vector<int> sort(vector<int> vec) {
    vector<int> sorted(vec.size(),0);
    sort(vec.begin(), vec.end());
    rep(i, vec.size()) {
        sorted[i] = vec[i];
    }
    return sorted;
}
vector<int> resort(vector<int> vec) {
    sort(vec);
    reverse(vec.begin(), vec.end());
    return vec;
}
vector<vector<int>> input(int n, int m) {
    vector<vector<int>> table(n, vector<int>(m));
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < m; j++) {
            cin >> table. at(i).at(j);
        }
    }
    return table;
}
void output(vector<vector<int>> table) {
    for (int i = 0; i < table.size(); i++) {
        for (int j = 0; j < table.at(0).size(); j++) {
            cout << table.at(i).at(j) << " ";
        }
        cout << endl;
    }
}
long long perm(int n, int r) {
    if (n < r) {
        cout << "error" << endl;
        return 0;
    }
    long long perm = 1;
    for (int i = n; i > n - r; i--) {
        perm *= i;
    }
    return perm;
}
long long comb(int n, int r) {
    if (n < r) {
        cout << "error" << endl;
        return 0;
    }
    long long comb = perm(n,r);
    for (int i = r; i > 0; i--) {
        comb /= i;
    }
    return comb;
}
long long homo(int n, int r) {
    return comb(n + r - 1, n - 1);
}
long long fact(int n) {
    long long fact = 1;
    for (int i = n; i > 0; i--) {
        fact *= i;
    }
    return fact;
}
int gcd(int a, int b)
{
    if (a % b == 0)
    {
        return(b);
    }
    else
    {
        return(gcd(b, a % b));
    }
}
int lcm(int a, int b) {
    return a * b / gcd(a, b);
}
int main() {
  string s;
  cin >> s;
  vector<char> c(s.size());
  rep(i,s.size()){
    c[i]=s[i];
  }
  vector<int> x(s.size());
  int sum=0;
  rep(i,s.size()){
    x[i]=ctoi(c[i]);
    sum += x[i];
  }
  if(stoi(s)%sum==0){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:107:10: error: 'ctoi' was not declared in this scope; did you mean 'atoi'?
  107 |     x[i]=ctoi(c[i]);
      |          ^~~~
      |          atoi
Language: C++

#include <iostream>
using namespace std;

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

    if(N%sum==0) cout << "Yes";
    else cout << "No";
    
    
     return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: storage size of 'N' isn't known
    6 |     int N[]; cin >> N;
      |         ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;


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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: a function-definition is not allowed here before '{' token
   10 |   int func(int x) {
      |                   ^
a.cc:14:11: error: 'func' was not declared in this scope
   14 |   int s = func(n);
      |           ^~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;


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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: a function-definition is not allowed here before '{' token
   10 |   int func(int x) {
      |                   ^
a.cc:14:11: error: 'func' was not declared in this scope
   14 |   int s = func(n);
      |           ^~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;


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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: a function-definition is not allowed here before '{' token
   10 |   int func(int x){
      |                  ^
a.cc:14:11: error: 'func' was not declared in this scope
   14 |   int s = func(n);
      |           ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin>>N;
  string S=to_string(N);
  int sum=0;
  for(int i=0;i<S.size()){
    sum=sum+(S.at(i)-'0');
  }
  if(N%sum==0){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:25: error: expected ';' before ')' token
    8 |   for(int i=0;i<S.size()){
      |                         ^
      |                         ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin>>N;
  string S=N.to_string();
  int sum=0;
  for(int i=0;i<S.size()){
    sum=sum+(S.at(i)-'0');
  }
  if(N%sum==0){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:14: error: request for member 'to_string' in 'N', which is of non-class type 'int'
    6 |   string S=N.to_string();
      |              ^~~~~~~~~
a.cc:8:25: error: expected ';' before ')' token
    8 |   for(int i=0;i<S.size()){
      |                         ^
      |                         ;
Language: C++

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


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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin >> n;
  string s=to_string(n);
  vector<int> vec(n);
  int i,sum=0;;
  for(i=0;i<n;i++){
    sum+=n%10;
    n/=10;
  if(n%sum==0){
    cout << "Yes";
  }else{
    cout << "No";
  }
}
    


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

#include<bits/stdc++.h>
using namespace std;
int main(){
int64_t N;
  cin>>N;
  string n=to_string(N);
  int k=n.size();
  int64_ s=0;
  for(int i=0;i<k;i++)
    s+=(int64_t)(n.at(i));
  if(N%s==0)
    cout<<"Yes"<<endl;
  else
    cout<<"No"<<endl;
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'int64_' was not declared in this scope; did you mean 'int64_t'?
    8 |   int64_ s=0;
      |   ^~~~~~
      |   int64_t
a.cc:10:5: error: 's' was not declared in this scope
   10 |     s+=(int64_t)(n.at(i));
      |     ^
a.cc:11:8: error: 's' was not declared in this scope
   11 |   if(N%s==0)
      |        ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
#define pb push_back
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef tuple<int,int,int> T;
typedef vector<P> vp;
typedef vector<T> vt;

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



Compiler output:
a.cc: In function 'int main()':
a.cc:31:12: error: expected '}' at end of input
   31 |   return 0;
      |            ^
a.cc:21:11: note: to match this '{'
   21 | int main(){
      |           ^
Language: C++

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

#define ll long long
#define ar array

int main() {

    ios::sync_with_stdio(false);
	
	int a, n, soma=0;
	
	cin >> a;
	numero = a;

    while (numero != 0) {
        soma   += numero % 10;
        numero  = numero / 10;
    }
    
    if (a%soma == 0){
    	cout << "Yes" << endl;
	}
	else{
		cout << "No" << endl;
	}

    return 0;
}


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

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

int main () {
  long long N;
  cin >> N;
  int cnt = 0;
  for (int i = 0; i < N.length(); ++i) {
    cnt += to_string(N)[i];
  }
  if (N % cnt == 0) cout << "Yes";
  else cout << "No";    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:25: error: request for member 'length' in 'N', which is of non-class type 'long long int'
    8 |   for (int i = 0; i < N.length(); ++i) {
      |                         ^~~~~~
Language: C++

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

int main () {
  string N;
  cin >> N;
  int cnt = 0;
  for (int i = 0; i < N.length(); ++i) {
    cnt += (int)N[i];
  }
  if ((int)N % cnt == 0) cout << "Yes";
  else cout << "No";    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: error: invalid cast from type 'std::string' {aka 'std::__cxx11::basic_string<char>'} to type 'int'
   11 |   if ((int)N % cnt == 0) cout << "Yes";
      |       ^~~~~~