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

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

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

    int fx = 0;

    for (int i = 0; i < 9; i++)
    {
        fx += x % 10;
        x /= 10;
    }

    if(x%fx==0) cout << "Yes" << endl;
    else cout << "No" endl;

    return 0;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:22: error: expected ';' before 'endl'
   22 |     else cout << "No" endl;
      |                      ^~~~~
      |                      ;
Language: C++

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

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

int main(){
  int n;
  int f(n) = ketasum(n);
  bool res = false;
  if (n % f(n) == 0) res = true;
  if (res) cout << "Yes" << endl;
  else cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:12: error: expected ',' or ';' before '=' token
   15 |   int f(n) = ketasum(n);
      |            ^
a.cc:17:12: error: 'f' cannot be used as a function
   17 |   if (n % f(n) == 0) res = true;
      |           ~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int p=0;
  long N;
  cin >> N;
  for(i=0;i<10;i++)
    p += (N/(long)powl(10,i+1))%10;
  
  cout << ((N%p)?"No":"Yes") << endl;
 
  // ここにプログラムを追記
}

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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int i, p=0;
  long N;
  cin >> N;
  for(i=0;i<10;i++)
    p += (N/powl(10,i+1))%10;
  
  cout << ((N%p)?"No":"Yes") << endl;
 
  // ここにプログラムを追記
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: error: invalid operands of types 'long double' and 'int' to binary 'operator%'
    9 |     p += (N/powl(10,i+1))%10;
      |          ~~~~~~~~~~~~~~~~^~~
      |            |              |
      |            long double    int
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:20:25: error: expected ';' before '}' token
   20 |     cout << "No" << endl}
      |                         ^
      |                         ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int f(N)=0;
  
  for(int i=0;i<9;i++) {
    f(N)+=N%10^(i+1)/10^i;
    if(N/10^i>=10) {
      f(N)+=0;
      break;}}
  if(N%f(N)==0) {
    cout << "Yes" << endl;}
  else {
    cout << "No" << endl;}
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: expected ',' or ';' before '=' token
    6 |   int f(N)=0;
      |           ^
a.cc:9:6: error: 'f' cannot be used as a function
    9 |     f(N)+=N%10^(i+1)/10^i;
      |     ~^~~
a.cc:11:8: error: 'f' cannot be used as a function
   11 |       f(N)+=0;
      |       ~^~~
a.cc:13:9: error: 'f' cannot be used as a function
   13 |   if(N%f(N)==0) {
      |        ~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int f(x)=0;
  
  for(int i=0;i<9;i++) {
    f(x)+=N%10^(i+1)/10^i;
    if(N/10^i>=10) {
      f(x)+=0;
      break;}}
  if(N%f(x)==0) {
    cout << "Yes" << endl;}
  else {
    cout << "No" << endl;}
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'x' was not declared in this scope
    6 |   int f(x)=0;
      |         ^
a.cc:9:6: error: 'f' cannot be used as a function
    9 |     f(x)+=N%10^(i+1)/10^i;
      |     ~^~~
a.cc:11:8: error: 'f' cannot be used as a function
   11 |       f(x)+=0;
      |       ~^~~
a.cc:13:9: error: 'f' cannot be used as a function
   13 |   if(N%f(x)==0) {
      |        ~^~~
Language: C++

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

int kurai (int n){
    int sum = 0;
    while(n > 0){
        sum += n % 10;
        n /= 10
    }
    return sum;
}
int main() {
    int N;
    cin >> N;
    bool harshad = false;
    int hoge = N % kurai(N);

    if (hoge = 0) cout << "True" << endl;
    else cout << "False" << endl;
}


Compiler output:
a.cc: In function 'int kurai(int)':
a.cc:8:16: error: expected ';' before '}' token
    8 |         n /= 10
      |                ^
      |                ;
    9 |     }
      |     ~
Language: C++

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

int kurai (int n){
    int sum = 0;
    while(n > 0){
        sum += n % 10;
        n \= 10
    }
    return sum;
}
int main() {
    int N;
    cin >> N;
    bool harshad = false;
    int hoge = N % kurai(N);

    if (hoge = 0) cout << "True" << endl;
    else cout << "False" << endl;
}


Compiler output:
a.cc:8:11: error: stray '\' in program
    8 |         n \= 10
      |           ^
a.cc: In function 'int kurai(int)':
a.cc:8:16: error: expected ';' before '}' token
    8 |         n \= 10
      |                ^
      |                ;
    9 |     }
      |     ~
Language: C

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

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

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

Compiler output:
main.c: In function 'main':
main.c:6:11: error: expected ';' before ')' token
    6 |   for(n>=0){
      |           ^
      |           ;
main.c:6:11: error: expected expression before ')' token
Language: C++

include <iostream>
using namespace std;
 
int main() {
  	int N;
  	cin >> N;
  	int sum = 0;
  	int X = N;
  	while (N > 0){
      	sum = sum + N % 10;
      	N = N / 10;
    }
  	if (X % sum == 0) cout << "Yes" << endl;
  	else cout << "No" << endl;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin >> N;
      |         ^~~
a.cc:13:27: error: 'cout' was not declared in this scope
   13 |         if (X % sum == 0) cout << "Yes" << endl;
      |                           ^~~~
a.cc:13:44: error: 'endl' was not declared in this scope
   13 |         if (X % sum == 0) cout << "Yes" << endl;
      |                                            ^~~~
a.cc:14:14: error: 'cout' was not declared in this scope
   14 |         else cout << "No" << endl;
      |              ^~~~
a.cc:14:30: error: 'endl' was not declared in this scope
   14 |         else cout << "No" << endl;
      |                              ^~~~
Language: C++

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: expected ';' before ':' token
    6 |         cin >> N:
      |                 ^
      |                 ;
a.cc:10:9: error: 'sum' was not declared in this scope
   10 |         sum = sum + N % 10;
      |         ^~~
a.cc:13:13: error: 'sum' was not declared in this scope
   13 |         if (sum == X) cout << "Yes" << endl;
      |             ^~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:29: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'int' to binary 'operator%'
   10 |   c += (t / std::pow(10,i)) % 10;
      |        ~~~~~~~~~~~~~~~~~~~~ ^ ~~
      |           |                   |
      |           |                   int
      |           __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:29: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'int' to binary 'operator%'
    9 |   c += (t / std::pow(10,i)) % 10;
      |        ~~~~~~~~~~~~~~~~~~~~ ^ ~~
      |           |                   |
      |           |                   int
      |           __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:31: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'int' to binary 'operator%'
    9 |   c += (t / std::pow(10,i+1)) % 10;
      |        ~~~~~~~~~~~~~~~~~~~~~~ ^ ~~
      |           |                     |
      |           |                     int
      |           __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:30: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'int' to binary 'operator%'
    9 |   c += (t / std::pow(10,i+1) % 10;
      |         ~~~~~~~~~~~~~~~~~~~~ ^ ~~
      |           |                    |
      |           |                    int
      |           __gnu_cxx::__promote<double>::__type {aka double}
a.cc:9:34: error: expected ')' before ';' token
    9 |   c += (t / std::pow(10,i+1) % 10;
      |        ~                         ^
      |                                  )
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: expected '}' before 'else'
   13 |   else
      |   ^~~~
a.cc:11:18: note: to match this '{'
   11 |   if (N % c == 0){
      |                  ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:14: error: expected primary-expression before '=' token
    4 |   int N,t,c; = 0
      |              ^
a.cc:13:3: error: expected '}' before 'else'
   13 |   else
      |   ^~~~
a.cc:11:18: note: to match this '{'
   11 |   if (N % c == 0){
      |                  ^
a.cc:14:5: error: 'ciut' was not declared in this scope
   14 |     ciut << "No" << endl;
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
const int INF = 1001001001;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: expected initializer before '+=' token
    8 | int ha += 0;
      |        ^~
a.cc:10:3: error: 'ha' was not declared in this scope
   10 |   ha = N % 10;
      |   ^~
a.cc:13:9: error: 'ha' was not declared in this scope
   13 | if (N % ha == 0) cout << "Yes" << endl;
      |         ^~
Language: Java

import java.util.*;

class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String N = sc.next();
    int n = Arrays.stream(N.split("")).mapToInt(Integer::parseInt).sum();
    System.out.println(Integer.paserInt(N)/n == 0 ? "Yes" : "No");
  }
}

Compiler output:
Main.java:8: error: cannot find symbol
    System.out.println(Integer.paserInt(N)/n == 0 ? "Yes" : "No");
                              ^
  symbol:   method paserInt(String)
  location: class Integer
1 error
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:22: error: expected ';' before ')' token
    6 |   for(int i=0;i<8,i++){
      |                      ^
      |                      ;
a.cc:7:10: error: 'pwd' was not declared in this scope
    7 |     w+=n/pwd(10,i) % 10;
      |          ^~~
Language: C++

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

int main() {
  int N;
  cin >> N;
  int sum = 0,x;
  
  for ( int i = 100000000; i != 0; i / 10 ) {
    sum += N / i;
    x = N / i;
    N -= x * i;
    //N -= N / i * i;
    
	if ( i == 1 ) {
      i--;
    }
    else
      continue;
  }
  
  if ( N % sum == 0 )
    cout << "Yes" << endl;
  else
    cout << "No"; << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:19: error: expected primary-expression before '<<' token
   25 |     cout << "No"; << endl;
      |                   ^~
Language: C++

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

Compiler output:
a.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int main{
      |     ^~~~
a.cc:4:3: error: expected primary-expression before 'int'
    4 |   int n;
      |   ^~~
a.cc:4:3: error: expected '}' before 'int'
a.cc:3:9: note: to match this '{'
    3 | int main{
      |         ^
a.cc:5:3: error: 'cin' does not name a type
    5 |   cin>>n;
      |   ^~~
a.cc:6:9: error: 'n' was not declared in this scope; did you mean 'yn'?
    6 |   int s=n;
      |         ^
      |         yn
a.cc:9:3: error: expected unqualified-id before 'for'
    9 |   for (int i = 0; i < 8; i++){
      |   ^~~
a.cc:9:19: error: 'i' does not name a type
    9 |   for (int i = 0; i < 8; i++){
      |                   ^
a.cc:9:26: error: 'i' does not name a type
    9 |   for (int i = 0; i < 8; i++){
      |                          ^
a.cc:14:3: error: expected unqualified-id before 'if'
   14 |   if(n%sum==0) cout<<"Yes"<<endl;
      |   ^~
a.cc:15:3: error: expected unqualified-id before 'else'
   15 |   else cout<<"No"<<endl;
      |   ^~~~
a.cc:16:1: error: expected declaration before '}' token
   16 | }
      | ^
Language: C++

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

Compiler output:
a.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int main{
      |     ^~~~
a.cc:4:3: error: expected primary-expression before 'int'
    4 |   int n;
      |   ^~~
a.cc:4:3: error: expected '}' before 'int'
a.cc:3:9: note: to match this '{'
    3 | int main{
      |         ^
a.cc:5:3: error: 'cin' does not name a type
    5 |   cin>>n;
      |   ^~~
a.cc:6:9: error: 'n' was not declared in this scope; did you mean 'yn'?
    6 |   int s=n;
      |         ^
      |         yn
a.cc:9:3: error: expected unqualified-id before 'for'
    9 |   for (int i = 0; i < 8; i++){
      |   ^~~
a.cc:9:19: error: 'i' does not name a type
    9 |   for (int i = 0; i < 8; i++){
      |                   ^
a.cc:9:26: error: 'i' does not name a type
    9 |   for (int i = 0; i < 8; i++){
      |                          ^
a.cc:14:3: error: expected unqualified-id before 'if'
   14 |   if(n%sum==0) cout<<"Yes"<<endl;
      |   ^~
a.cc:15:3: error: expected unqualified-id before 'else'
   15 |   else cout<<"No"<<endl;
      |   ^~~~
Language: C

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

#define MAX(a,b) (a > b ? a : b)
#define MIN(a,b) (a < b ? a : b)
const int inf = 1000000000; // 10^9

int main(){
   char n[20];scanf("%s",n);
   int h1=0,h2=0;
   for(int i = 1,int j = 0;i < strlen(s);i++,j*=10){
      h1 += (int)n[i];
      h2 += (int)n[i];
   }
   if(h2%h1==0)printf("Yes");
   else printf("No");

}

Compiler output:
main.c: In function 'main':
main.c:12:18: error: expected identifier or '(' before 'int'
   12 |    for(int i = 1,int j = 0;i < strlen(s);i++,j*=10){
      |                  ^~~
main.c:12:39: error: 's' undeclared (first use in this function)
   12 |    for(int i = 1,int j = 0;i < strlen(s);i++,j*=10){
      |                                       ^
main.c:12:39: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:46: error: 'j' undeclared (first use in this function)
   12 |    for(int i = 1,int j = 0;i < strlen(s);i++,j*=10){
      |                                              ^
Language: C

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

#define MAX(a,b) (a > b ? a : b)
#define MIN(a,b) (a < b ? a : b)
const int inf = 1000000000; // 10^9

int main(){
   char n[20];scanf("%s",);
   int h1=0,h2=0;
   for(int i = 1,int j = 0;i < strlen(s);i++,j*=10){
      h1 += (int)n[i];
      h2 += (int)n[i];
   }
   if(h2%h1==0)printf("Yes");
   else printf("No");

}

Compiler output:
main.c: In function 'main':
main.c:10:26: error: expected expression before ')' token
   10 |    char n[20];scanf("%s",);
      |                          ^
main.c:12:18: error: expected identifier or '(' before 'int'
   12 |    for(int i = 1,int j = 0;i < strlen(s);i++,j*=10){
      |                  ^~~
main.c:12:39: error: 's' undeclared (first use in this function)
   12 |    for(int i = 1,int j = 0;i < strlen(s);i++,j*=10){
      |                                       ^
main.c:12:39: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:46: error: 'j' undeclared (first use in this function)
   12 |    for(int i = 1,int j = 0;i < strlen(s);i++,j*=10){
      |                                              ^
Language: C++

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

int main() {
  
  int N;
  cin >> N;
  int sum = 0,x = 100000000,y;
  
  for ( int i = 0; i < 8; i++ ) {
    sum += N / x;	//最上位桁の数を足す
    y =　N / x;
    N -= y * x;
    x /= 10;
  }
  
  if ( N % sum == 0 ) {
    cout << "Yes";
  }
  else
    cout << "No";
}


Compiler output:
a.cc:12:8: error: extended character 　 is not valid in an identifier
   12 |     y =　N / x;
      |        ^
a.cc: In function 'int main()':
a.cc:12:8: error: '\U00003000N' was not declared in this scope
   12 |     y =　N / x;
      |        ^~~
Language: C++

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

int main() {
  
  int N;
  cin >> N;
  int sum = 0,x = 100000000,y;
  
  for ( int i = 0; i < 7; i++ ) {
    sum += N / x;	//最上位桁の数を足す
    y =　N / x;
    N -= y * x;
    x /= 10;
  }
  
  if ( N % sum == 0 ) {
    cout << "Yes";
  }
  else
    cout << "No";
}


Compiler output:
a.cc:12:8: error: extended character 　 is not valid in an identifier
   12 |     y =　N / x;
      |        ^
a.cc: In function 'int main()':
a.cc:12:8: error: '\U00003000N' was not declared in this scope
   12 |     y =　N / x;
      |        ^~~
Language: C++

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

int main() {
  int N M;
  int f=0;
  int a;
  int x=100*100*100*100;
  cin >> N;
  M=N;
  for (int i=0;i<9;i++){
    a=N/x;
    f+=a;
    N-=a*x;
    x/=10;
  }
  if (M%f==0){
    cout << "Yes" << endl;
  }
  if (M%f!=0){
    cout << "No" << endl;
  }
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: expected initializer before 'M'
    5 |   int N M;
      |         ^
a.cc:9:10: error: 'N' was not declared in this scope
    9 |   cin >> N;
      |          ^
a.cc:10:3: error: 'M' was not declared in this scope
   10 |   M=N;
      |   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
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:9:11: error: 'func' was not declared in this scope
    9 |   int s = func(N);
      |           ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(void){
  
  int N;
  cin >> N;
  
  int M = func(N);
  
  if(N % M == 0){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" <<endl;
  }
  return 0;
}

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

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

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

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

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


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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: expected ';' before '}' token
   10 |     n /= 10
      |            ^
      |            ;
   11 |   }
      |   ~
Language: C++

#include<iostream>
using namespace std;
int SumOfDisit(int n){
  int sum;
  while(int n>0){
    sum+=n%10;
    n/=10;
  } 
  return sum;
}
int main(){
int N;
cin>>N;
if(N%SumOfDisit(N)==0){
  cout<<"Yes";
} 
else {
cout<<"No";}
}

Compiler output:
a.cc: In function 'int SumOfDisit(int)':
a.cc:5:14: error: expected initializer before '>' token
    5 |   while(int n>0){
      |              ^
a.cc:5:14: error: expected ')' before '>' token
    5 |   while(int n>0){
      |        ~     ^
      |              )
a.cc:5:14: error: expected primary-expression before '>' token
Language: C++

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

int main() {
  int N;
  cin >> N;
  int x=0;
  int y=N;
  
  while (y>0) {
    x += y%10;
    y = y/10;
  }
  
  if (N%x == 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:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: expected ';' before 'if'
    8 |   sum = N%9
      |            ^
      |            ;
    9 |   if (N%sum == 0) {
      |   ~~        
a.cc:12:3: error: 'else' without a previous 'if'
   12 |   else {
      |   ^~~~
Language: C++

#include <bits/stdc++.h>
 
using namespace std;
 
int main()
  {
    long int n;
    scanf("%ld",&n);
    long int n=o;
    int s=0;
    while(n!=0)
    {
       s+=n%10;
       n/=10;
    }
  
    if((o%s)==0)
        printf("Yes");
  
    else
       printf("No");
           
  
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: redeclaration of 'long int n'
    9 |     long int n=o;
      |              ^
a.cc:7:14: note: 'long int n' previously declared here
    7 |     long int n;
      |              ^
a.cc:9:16: error: 'o' was not declared in this scope
    9 |     long int n=o;
      |                ^
Language: C++

#include <bits/stdc++.h>
 
using namespace std;
 
int main()
  {
    long int n;
    scanf("%ld",&n);
    long int n=o;
    int s=0;
    while(n!=0)
    {
       s+=n%10;
       n/=10;
    }
  
    if(o%s==0)
        printf("Yes");
  
    else
       printf("No");
           
  
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: redeclaration of 'long int n'
    9 |     long int n=o;
      |              ^
a.cc:7:14: note: 'long int n' previously declared here
    7 |     long int n;
      |              ^
a.cc:9:16: error: 'o' was not declared in this scope
    9 |     long int n=o;
      |                ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
    cin >> N;
  int x;
  x = N / 10 + N % 10; // 各桁の和
  int y;  
  y = N / x;
  if (N == y * x){
    cout << "Yes" << endl;
  }
    else {
      cout << "No" << endl;
    }
  }
  }

Compiler output:
a.cc:18:3: error: expected declaration before '}' token
   18 |   }
      |   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main () {
  int N;
  cin >> N;
  int t = N, c = 0;
  while (t > 0) c += t % 10, t /= 10;
  if (N % C == 0) cout << "Yes" << endl;
  else cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: 'C' was not declared in this scope
    9 |   if (N % C == 0) cout << "Yes" << endl;
      |           ^
Language: C++

#include <bits/stdc++.h> 
#include <math.h>
#include <iostream.h>

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

int main()
{
  int n;
  int nb[11];
  cin >> n;
  int tmp = n;
  int i = 0;
  int sum = 0;
  rep(i, n) nb[i] = 0;
  while(tmp > 0)
  {
	nb[i] = tmp % 10;
    tmp /= 10;
    i++;
  }
  int length = 0;
  while(nb[length] != 0) length++;
  rep(i, length)  sum += nb[i];
  if(n % sum == 0) cout << "Yes" << endl;
  else cout << "No" << endl;
  return 0;
}


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

#include<iostream>
using namespace std;

int main(){
  int N = 0;
  int l, f = 0;
  cin >> N;
  string n = N;
  l = sizeof(N);
  
  for(int i=0;i<l;i++){
    f += int n[i];
  }
  if(N%f==0)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    8 |   string n = N;
      |              ^
a.cc:12:10: error: expected primary-expression before 'int'
   12 |     f += int n[i];
      |          ^~~
Language: C++

#include<iostream>
using namespace std;

int main(){
  int N = 0;
  int l, f = 0;
  cin >> N;
  string N = N;
  l = sizeof(N);
  
  for(int i=0;i<l;i++){
    f += int N[i];
  }
  if(N%f==0)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: conflicting declaration 'std::string N'
    8 |   string N = N;
      |          ^
a.cc:5:7: note: previous declaration as 'int N'
    5 |   int N = 0;
      |       ^
a.cc:12:10: error: expected primary-expression before 'int'
   12 |     f += int N[i];
      |          ^~~
Language: C++

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

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


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

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


Compiler output:
main.c:20:2: error: expected identifier or '(' before '}' token
   20 | }}
      |  ^
Language: C++

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

int main() {
  int n,a;
  cin >> n;
  fx = 0;
  a = n;
  for (int i = 0; i<8; i++) {
    n %= 10;
    fx += n;
  }
  if (fx == a ) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}



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

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

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



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

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

int main() {
  int N,f,a;
  cin >> N;
  f=0;
  a=1;

  for (int i=0; i<8; i++){
    a*=10;
    f+=N/a%10;
    if (i==7){
      if (N%f==0)
        cout << "Yes" << endl;
      else
        cout << "No" << endl;
    }
}

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

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

int main() {
  int N,f,a;
  cin >> N;
  f=0;
  a=1;

  for (int i=0; i<8; i++){
    a*=10;
    f+=N/a%10;
    if (i==7){
      if (N%f==0)
        cout << "Yes" << endl;
      else
        cout << "No" << endl;
    }
}


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

#include <iostream>
using namespace std;


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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: 'Y' was not declared in this scope
    7 |   cin >> N, Y;
      |             ^
Language: C++

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

main() {
  int N, x, y, sum, n;
  cin >> N;
  n = N;
  for(int i=0; i<10; i++){
    x = 10^(i+1)
    y = 10^i
    sum += (N%x)/y
    N -= N%x
  }
  if(n%sum == 0){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }    
}


Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:9:17: error: expected ';' before 'y'
    9 |     x = 10^(i+1)
      |                 ^
      |                 ;
   10 |     y = 10^i
      |     ~
Language: C++

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

main() {
  int N, x, y, sum, n;
  cin >> N;
  n = N;
  for(int i=0; i<9; i++){
    x = 10^(i+1)
    y = 10^i
    sum += (N%x)/y
    N -= N%x
  }
  if(n%sum == 0){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }    
}

Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:9:17: error: expected ';' before 'y'
    9 |     x = 10^(i+1)
      |                 ^
      |                 ;
   10 |     y = 10^i
      |     ~
Language: C++

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

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


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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:6: error: lvalue required as left operand of assignment
   11 |     n%10=k;
      |     ~^~~
Language: C++

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

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


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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'k' was not declared in this scope
   10 |     k= n%10;
      |     ^
a.cc:15:7: error: lvalue required as left operand of assignment
   15 |   if(n%f=0)
      |      ~^~
Language: C++

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

int main() {
  int N, A;
  int sum = 0;
  
  cin >> N;
  A = N;
  
  while() {
    if(A % 10 == 0) {
      sum += 0;
      A /= 10;
    } else if(A % 10 == 1) {
      sum += 1;
      A -= 1; A /= 10;
    } else if(A % 10 == 2) {
      sum += 2;
      A -= 2; A /= 10;
    } else if(A % 10 == 3) {
      sum += 3;
      A -= 3; A /= 10;
    } else if(A % 10 == 4) {
      sum += 4;
      A -= 4; A /= 10;
    } else if(A % 10 == 5) {
      sum += 5;
      A -= 5; A /= 10;
    } else if(A % 10 == 6) {
      sum += 6;
      A -= 6; A /= 10;
    } else if(A % 10 == 7) {
      sum += 7;
      A -= 7; A /= 10;
    } else if(A % 10 == 8) {
      sum += 8;
      A -= 8; A /= 10;
    } else if(A % 10 == 9) {
      sum += 9;
      A -= 9; A /= 10;
    }
    if(A == 0) break;
  }
  
  if(N % A == 0) cout << "Yes" << endl;
  else cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: expected primary-expression before ')' token
   11 |   while() {
      |         ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  int n,sum=0;
  cin>>n;
  n2=n;
  string ans;
  while(t>0)sum+=n2%10,n2/=10;
  if(n%sum==0)ans="Yes";
  else ans="No";
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'n2' was not declared in this scope; did you mean 'n'?
    6 |   n2=n;
      |   ^~
      |   n
a.cc:8:9: error: 't' was not declared in this scope
    8 |   while(t>0)sum+=n2%10,n2/=10;
      |         ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  string n,ans;
  cin>>n;
  int a=static_cast<int>(n),sum=0;
  for(int i=0;i<n.size();i++)sum+=n[i];
  if(a%sum==0)ans="Yes";
  else ans="No";
  cout<<ans<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: invalid 'static_cast' from type 'std::string' {aka 'std::__cxx11::basic_string<char>'} to type 'int'
    6 |   int a=static_cast<int>(n),sum=0;
      |         ^~~~~~~~~~~~~~~~~~~
a.cc:7:30: error: 'sum' was not declared in this scope
    7 |   for(int i=0;i<n.size();i++)sum+=n[i];
      |                              ^~~
a.cc:8:8: error: 'sum' was not declared in this scope
    8 |   if(a%sum==0)ans="Yes";
      |        ^~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  string n,ans;
  cin>>n;
  int a=static_cast&lt;int&gt;(n);,sum=0;
  for(int i=0;i<n.size();i++)sum+=n[i];
  if(a%sum==0)ans="Yes";
  else ans="No";
  cout<<ans<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:20: error: expected '<' before '&' token
    6 |   int a=static_cast&lt;int&gt;(n);,sum=0;
      |                    ^
a.cc:6:20: error: expected type-specifier before '&' token
a.cc:6:20: error: expected '>' before '&' token
a.cc:6:20: error: expected '(' before '&' token
    6 |   int a=static_cast&lt;int&gt;(n);,sum=0;
      |                    ^
      |                    (
a.cc:6:21: error: 'lt' was not declared in this scope
    6 |   int a=static_cast&lt;int&gt;(n);,sum=0;
      |                     ^~
a.cc:6:23: error: expected ')' before ';' token
    6 |   int a=static_cast&lt;int&gt;(n);,sum=0;
      |                       ^
      |                       )
a.cc:6:28: error: 'gt' declared as reference but not initialized
    6 |   int a=static_cast&lt;int&gt;(n);,sum=0;
      |                            ^~
a.cc:6:35: error: expected primary-expression before ',' token
    6 |   int a=static_cast&lt;int&gt;(n);,sum=0;
      |                                   ^
a.cc:6:36: error: 'sum' was not declared in this scope
    6 |   int a=static_cast&lt;int&gt;(n);,sum=0;
      |                                    ^~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  string n,ans;
  cin>>n;
  int a=n,sum=0;
  for(int i=0;i<n.size();i++)sum+=n[i];
  if(a%sum==0)ans="Yes";
  else ans="No";
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int' in initialization
    6 |   int a=n,sum=0;
      |         ^
      |         |
      |         std::string {aka std::__cxx11::basic_string<char>}
Language: C++

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

int main(){
  int N;
  cin >> N;
  
  for (int i = 0; i < N.size(); i++){
    N.at(i)

Compiler output:
a.cc: In function 'int main()':
a.cc:8:25: error: request for member 'size' in 'N', which is of non-class type 'int'
    8 |   for (int i = 0; i < N.size(); i++){
      |                         ^~~~
a.cc:9:7: error: request for member 'at' in 'N', which is of non-class type 'int'
    9 |     N.at(i)
      |       ^~
a.cc:9:12: error: expected '}' at end of input
    9 |     N.at(i)
      |            ^
a.cc:8:37: note: to match this '{'
    8 |   for (int i = 0; i < N.size(); i++){
      |                                     ^
a.cc:9:12: error: expected '}' at end of input
    9 |     N.at(i)
      |            ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:23: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'int' to binary 'operator%'
   10 |     f += (N/pow(10,i))%10;
      |          ~~~~~~~~~~~~~^~~
      |            |           |
      |            |           int
      |            __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

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

int main() {
  int N;
  int sum;
  int x,y;
  
  sum = 0 ;
  cin >> N ;
  y = N ;
  
  for(int i = length.N ; i>0; i--){
    x = y / (10^i);
    sum += x ;
    
    y -= x * (10^i);
    
  }  
  
  if(N%sum == 0){
   cout << "Yes"; 
  }else{
   cout << "No" ; 
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:15: error: 'length' was not declared in this scope
   13 |   for(int i = length.N ; i>0; i--){
      |               ^~~~~~
Language: C++

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

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


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

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

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


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

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

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


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

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

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


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

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

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


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

#include <iostream>
using namespace std;

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: 'dc' was not declared in this scope; did you mean 'c'?
    8 |   if(N%dc==0) puts("Yes");
      |        ^~
      |        c
Language: C++

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

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

  for(int i = 0; i < 8; i++) {
    int x=1;
    for(int j = 0; j < i;j++)
      x *= 10;
    sum += N%(10*x)-N%(x)
  }

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


Compiler output:
a.cc: In function 'int main()':
a.cc:13:26: error: expected ';' before '}' token
   13 |     sum += N%(10*x)-N%(x)
      |                          ^
      |                          ;
   14 |   }
      |   ~
Language: C++

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

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

  for(int i = 0; i < 8; i++) {
    int x=1;
    for(int j = 0; j < i;j++)
      x *= 10
    sum += N%(10*x)-N%(x)
  }

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


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

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

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

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

#include<iostream>
#inlcude<cmath>

int main(){
  long long int n,num,s = 0,a;
  std::cin >> n;
  num = n;
  while(n){
    a = n % 10;
    s += a;
    n /= 10;
  }
  if(num % s == 0)
    std::cout << "Yes" << std::endl;
  else
    std::cout << "No" << std::endl;
	return 0;
}


Compiler output:
a.cc:2:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    2 | #inlcude<cmath>
      |  ^~~~~~~
      |  include
Language: C++

#include<iostream>
#inlcude<cmath>

int main(){
  long long int n,num,s = 0;
  std::cin >> n;
  num = n;
  while(n){
    a = n % 10;
    s += a;
    n /= 10;
  }
  if(num % s == 0)
    std::cout << "Yes" << std::endl;
  else
    std::cout << "No" << std::endl;
	return 0;
}


Compiler output:
a.cc:2:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    2 | #inlcude<cmath>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:9:5: error: 'a' was not declared in this scope
    9 |     a = n % 10;
      |     ^
Language: C++

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

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

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


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

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

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

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: 'Yes' was not declared in this scope
   14 |     cout << Yes<< endl;
      |             ^~~
a.cc:15:16: error: 'No' was not declared in this scope; did you mean 'N'?
   15 |   else cout << No << endl;
      |                ^~
      |                N
Language: C++

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

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