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

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

int main() {
  int N;
  cin >> N;
  int A = 0; B = 0; C = 0; D = 0; E = 0; F = 0; G = 0; H = 0; I = 0 
  
  A == N % 100000000
  B == N % 10000000 - N % 100000000 * 10
  C == N % 1000000 - N % 10000000 * 10
  D == N % 100000 - N % 1000000 * 10
  E == N % 10000 - N % 100000 * 10
  F == N % 1000 - N % 10000 * 10
  G == N % 100 - N % 1000 * 10
  H == N % 10 - N % 100 * 10
  F == N % 1 - N % 10 * 10
  
  X = A + B + C + D + E + F + G + H
    
    if (N % X == 0)
      cout << "Yes" << endl;
    else if (N % X != 0)
      cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: 'B' was not declared in this scope
    7 |   int A = 0; B = 0; C = 0; D = 0; E = 0; F = 0; G = 0; H = 0; I = 0
      |              ^
a.cc:7:21: error: 'C' was not declared in this scope
    7 |   int A = 0; B = 0; C = 0; D = 0; E = 0; F = 0; G = 0; H = 0; I = 0
      |                     ^
a.cc:7:28: error: 'D' was not declared in this scope
    7 |   int A = 0; B = 0; C = 0; D = 0; E = 0; F = 0; G = 0; H = 0; I = 0
      |                            ^
a.cc:7:35: error: 'E' was not declared in this scope
    7 |   int A = 0; B = 0; C = 0; D = 0; E = 0; F = 0; G = 0; H = 0; I = 0
      |                                   ^
a.cc:7:42: error: 'F' was not declared in this scope
    7 |   int A = 0; B = 0; C = 0; D = 0; E = 0; F = 0; G = 0; H = 0; I = 0
      |                                          ^
a.cc:7:49: error: 'G' was not declared in this scope
    7 |   int A = 0; B = 0; C = 0; D = 0; E = 0; F = 0; G = 0; H = 0; I = 0
      |                                                 ^
a.cc:7:56: error: 'H' was not declared in this scope
    7 |   int A = 0; B = 0; C = 0; D = 0; E = 0; F = 0; G = 0; H = 0; I = 0
      |                                                        ^
a.cc:7:63: error: 'I' was not declared in this scope
    7 |   int A = 0; B = 0; C = 0; D = 0; E = 0; F = 0; G = 0; H = 0; I = 0
      |                                                               ^
a.cc:23:5: error: 'else' without a previous 'if'
   23 |     else if (N % X != 0)
      |     ^~~~
a.cc:23:18: error: 'X' was not declared in this scope
   23 |     else if (N % X != 0)
      |                  ^
Language: C++

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

int main() {
int N,N2,f,t;
  f=0;
  cin>>N;
  N2=N;
  t=100000000
  rep(i,8){f+=N2/t;N2-=N2/t*t;t/=10;}
  if(N%f){cout<<"Yes"<<endl;}
    else{cout<<"No"<<endl;}    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: expected ';' before 'for'
   10 |   t=100000000
      |              ^
      |              ;
a.cc:11:7: error: 'i' was not declared in this scope
   11 |   rep(i,8){f+=N2/t;N2-=N2/t*t;t/=10;}
      |       ^
a.cc:3:35: note: in definition of macro 'rep'
    3 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
      |                                   ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: expected ';' before 'cin'
    8 |   t=100000000
      |              ^
      |              ;
    9 |   cin>>N;
      |   ~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:25: error: request for member 'size' in 'N', which is of non-class type 'int'
   10 |   for (int i = 0; i < N.size(); i++) {
      |                         ^~~~
a.cc:11:13: error: invalid types 'int[int]' for array subscript
   11 |     sum += N[0];
      |             ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:23: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'int' to binary 'operator%'
   11 |     B += A/(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,;
  string ans;
  cin >> N;
  int a[8];
  int sum=0;
  for (int i=0;i<8;i++){
 	a[i] = (value % 10);
    value /= 10;
    sum += a[i];
  }
  int b;
  b = N/sum;
  
  if (sum*b ==N){
  ans = "Yes";
  }else{
  ans = "No";
  }
  
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: expected unqualified-id before ';' token
    5 |   int N,;
      |         ^
a.cc:11:17: error: 'value' was not declared in this scope
   11 |         a[i] = (value % 10);
      |                 ^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N,;
  string ans;
  cin >> N;
  int a[8];
  int sum=0;
  for (int i=0;i<8;i++){
 	a[i] = (value % 10);
    value /= 10;
    sum += a[i]
  }
  int b;
  b = N/sum;
  
  if (sum*b ==N){
  ans = "Yes";
  }else{
  ans = "No";
  }
  
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: expected unqualified-id before ';' token
    5 |   int N,;
      |         ^
a.cc:11:17: error: 'value' was not declared in this scope
   11 |         a[i] = (value % 10);
      |                 ^~~~~
a.cc:13:16: error: expected ';' before '}' token
   13 |     sum += a[i]
      |                ^
      |                ;
   14 |   }
      |   ~
Language: C++

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

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

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

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

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

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

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'nacespace'
    2 | using nacespace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:15:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   15 |   cin >> n;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 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:17:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |     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:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   17 |     cout << "Yes" << endl;
      |                      ^~~~
      |                      std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:19:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   19 |     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:19:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   19 |     cout << "No" < endl;
      |                    ^~~~
      |                    std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: expected ';' before 'while'
    8 |               res = N
      |                      ^
      |                      ;
    9 |               while(N > 0){
      |               ~~~~~   
a.cc:14:24: error: 'sum' was not declared in this scope
   14 |               if(res % sum == 0){
      |                        ^~~
Language: C++

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

int main() {

    int N, sum, rem, remsum;
    sum = 0, remsum = 0;

    for(i = 0; N >= 0; i++){
        rem = N % (10 * (i + 1));
        remsum += rem / (10 * (i -1));
        N -= rem;
    }

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

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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string N;
  int s=0;
  cin >> N:
  for(int i=0;i<N.length();i++){
    s+=N[i];
  }
  int ans = stoi(N)%s;
  if(ans==0) cout<<"Yes"<<endl;
  else cout << "No" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: expected ';' before ':' token
    7 |   cin >> N:
      |           ^
      |           ;
a.cc:8:15: error: 'i' was not declared in this scope
    8 |   for(int i=0;i<N.length();i++){
      |               ^
Language: C++

#include<vector>
#include<algorithm>
#include<string>
using namespace std;
int main(void){
    int X,x;
    cin >> X;
    x=X;
    int fX=0;
    for(;;){
        fX += X%10;
        X -= X%10;
        if(X==0)break;
        else X /= 10;
    }
    if(x%fX==0){
        cout << "Yes" << "\n";
    }
    else{
        cout << "No" << "\n";
    }
    return 0;
}

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

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

Compiler output:
a.cc:1:20: warning: extra tokens at end of #include directive
    1 | #include <cstdio > int N;
      |                    ^~~
a.cc:1:10: fatal error: cstdio : No such file or directory
    1 | #include <cstdio > int N;
      |          ^~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
using namespace std;

int main() {
  int N, res, digsum, minus;
  cin >> N;
  for(int i = 0; i < 8; i++){
    minus = 1;
    res = N;
    for(int j = 0; j < 8-i; j++){
      res /= 10;
    }
    for(int k = 0; k < 8-i; k++){
      minus *=10
    }
    N -= minus;
    digsum += res;
  }
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'func' was not declared in this scope
    7 |   int c=func(N);
      |         ^~~~
a.cc: At global scope:
a.cc:15:1: error: ISO C++ forbids declaration of 'func' with no type [-fpermissive]
   15 | func(int N){
      | ^~~~
a.cc:17:3: error: expected unqualified-id before 'return'
   17 | } return f(N/10)+N%10;
      |   ^~~~~~
a.cc: In function 'int func(int)':
a.cc:17:1: warning: control reaches end of non-void function [-Wreturn-type]
   17 | } return f(N/10)+N%10;
      | ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'func' was not declared in this scope
    6 |   int c=func(N);
      |         ^~~~
a.cc: At global scope:
a.cc:14:1: error: ISO C++ forbids declaration of 'func' with no type [-fpermissive]
   14 | func(int N){
      | ^~~~
a.cc:16:3: error: expected unqualified-id before 'return'
   16 | } return f(N/10)+N%10;
      |   ^~~~~~
a.cc: In function 'int func(int)':
a.cc:16:1: warning: control reaches end of non-void function [-Wreturn-type]
   16 | } return f(N/10)+N%10;
      | ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'i' was not declared in this scope
   10 |   if(N2%i==0)
      |         ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define arep(i,x,n) for(int i=int(x);i<(int)(n);i++)
#define rep(i,n) for(long long i = 0;i < n;++i)
#define pi 3.141592653589793
#define eps 0.00000001
#define INF 1e9+7  
using ll = long long; 
using P=pair<int,int>;
using lP=pair<ll,ll>;
using fP=pair<double,double>;
ll const mod=998244353;
const ll MAX=300000;
using vi=vector<int>;
using vc=vector<char>;
using vs=vector<string>;
using vvi =vector<vector<int>>;
using vvc=vector<vector<char>>;
using vvp =vector<vector<P>>;
int main(){
    int n;
    cin>>n;
    int sum=0,tmp=n;
    while(tmp>0){
        sum+=(tmp%10);
        tmp/=10;
    }
    if(n%sum==0)cout<<"Yes"<<endl;
    else cout<<"No"
    return 0;
}

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

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

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namesppace'
    2 | using namesppace std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:4: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |    cin>>N;
      |    ^~~
      |    std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 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:12:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |     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:12:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   12 |     cout<<"Yes"<<endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:14:10: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |     else{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:14:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   14 |     else{cout<<"No"<<endl;}
      |                      ^~~~
      |                      std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namesppace'
    2 | using namesppace std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:4: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |    cin>>N;
      |    ^~~
      |    std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 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:12:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |     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:12:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   12 |     cout<<"Yes"<<endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:14:10: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |     else{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:14:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   14 |     else{cout<<"No"<<endl;}
      |                      ^~~~
      |                      std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:14:28: error: expected '}' at end of input
   14 |     else{cout<<"No"<<endl;}
      |                            ^
a.cc:3:13: note: to match this '{'
    3 |   int main(){
      |             ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: expected ';' before 'int'
    7 |   n = k
      |        ^
      |        ;
    8 |   int x = 0;
      |   ~~~   
a.cc:11:5: error: 'x' was not declared in this scope
   11 |     x += n%10;
      |     ^
a.cc:15:10: error: 'x' was not declared in this scope
   15 |   if(k % x == 0)
      |          ^
Language: C++

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














Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: expected ';' before 'while'
    8 |         t = N
      |              ^
      |              ;
    9 |         while (t > 0) {
      |         ~~~~~ 
a.cc:13:18: error: expected ';' before '}' token
   13 |         cout << c
      |                  ^
      |                  ;
   14 | }
      | ~
Language: C++

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















Compiler output:
a.cc: In function 'int main()':
a.cc:15:23: error: expected ';' before '}' token
   15 |                 x += 1
      |                       ^
      |                       ;
   16 |         }
      |         ~
Language: C++

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










Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'cin' was not declared in this scope
    3 |         cin >> N;
      |         ^~~
a.cc:22:9: error: 'cout' was not declared in this scope
   22 |         cout << "Yes";
      |         ^~~~
a.cc:25:9: error: 'cout' was not declared in this scope
   25 |         cout << "No";
      |         ^~~~
Language: C++

int main() {
	int N;
  	cin >> N;
  
  	int x=1;
  	int a=0;
  	int b=1;
  
	for (int i=1; i<=N; i++){
    	if (N / (10*i) > 0) {
          x += 1;
          continue;
        }
    }
      	
  	for (int i=x; i>0; i--) {
    		for (int j=0; j<x; j++){
            	b *= 10;
            }
      		a += N/b;
    }
      
    if (a % N == 0) {
    	cout << "Yes";
    } 
    else {
    	cout << "No";
    }
}










Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'cin' was not declared in this scope
    3 |         cin >> N;
      |         ^~~
a.cc:24:9: error: 'cout' was not declared in this scope
   24 |         cout << "Yes";
      |         ^~~~
a.cc:27:9: error: 'cout' was not declared in this scope
   27 |         cout << "No";
      |         ^~~~
Language: C++

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

int main() {
	int N;
  	cin >> N;
  	int x=0;
  	int a=0;
  	int b=0;
  
	for (int i=1; i<=N; i++){
    	if (N / (10*i) > 0) {
          x += 1;
          continue;
        }
    }
      	
  	for (int i=x; i>0; i--) {
    		for (int j=0; j<x; i++){
            	b *= 10
            }
      		a += N/b
    }
      
    if (a % N == 0) {
    	cout << "Yes";
    } 
    else {
    	cout << "No";
    }
}






Compiler output:
a.cc: In function 'int main()':
a.cc:20:24: error: expected ';' before '}' token
   20 |                 b *= 10
      |                        ^
      |                        ;
   21 |             }
      |             ~           
a.cc:22:25: error: expected ';' before '}' token
   22 |                 a += N/b
      |                         ^
      |                         ;
   23 |     }
      |     ~
Language: C++

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

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





Compiler output:
a.cc: In function 'int main()':
a.cc:18:28: error: invalid type argument of unary '*' (have 'int')
   18 |                 a += N/(10**i);
      |                            ^~
Language: C++

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

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



Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: 'i' was not declared in this scope
   10 |         for (i=1; i<=N; i++){
      |              ^
a.cc:21:17: error: 'Yes' was not declared in this scope
   21 |         cout << Yes;
      |                 ^~~
a.cc:24:17: error: 'No' was not declared in this scope; did you mean 'N'?
   24 |         cout << No;
      |                 ^~
      |                 N
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: expected ';' before 'if'
   10 |     Y = N
      |          ^
      |          ;
   11 |     if(Y%10 == 0){
      |     ~~
Language: C++

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: 'o' was not declared in this scope
    6 |   X = o;
      |       ^
a.cc:9:14: error: expected ';' before 'if'
    9 |     X += N%10
      |              ^
      |              ;
   10 |     if(N /=10 == 0){
      |     ~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N, X;
  cin  >> N
  X=(N/100000000) + (N%100000000)/10000000 + (N%10000000)/1000000 + (N%1000000)/100000 + (N%100000)/10000 + (N%10000)/1000 + (N%1000)/100 + (N%100)/10 + (N%100)%10;
  
  if (N%X == 0) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: expected ';' before 'X'
    6 |   cin  >> N
      |            ^
      |            ;
    7 |   X=(N/100000000) + (N%100000000)/10000000 + (N%10000000)/1000000 + (N%1000000)/100000 + (N%100000)/10000 + (N%10000)/1000 + (N%1000)/100 + (N%100)/10 + (N%100)%10;
      |   ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
	string  x;
	cin >> x;
	
	int fx;
	for(int i=0; i<(int)x.size(); i++){
		fx += (int)x[i];
	}
	
	if((int)x / fx == 0){
		cout << "Yes" << endl;
	}else{
		cout << "No" << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:12: error: invalid cast from type 'std::string' {aka 'std::__cxx11::basic_string<char>'} to type 'int'
   13 |         if((int)x / fx == 0){
      |            ^~~~~~
Language: C++

#include <iostream>
using namespace std;

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

int main(){
  int n,f_n;
  cin >> n;
  f_n = numbersum(n);
  if(f_n % n == 0) cout << "Yes";
  else cout << "No";
}
  

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

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

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

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

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

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

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

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

int main() {
  int N,a,b,c,d,e,f,g,h,i,x ;
  cin >> N ;
  a= N %10 ;
  b= (N%100 -N%10)/10 ;
  c= (N%1000)/100 ;
  e= (N%10000)/1000;
  f= (N%100000)/10000;
  g= (N%1000000)/100000;
  h= (N%10000000)/1000000;
  i= (N%100000000)/10000000;
  
  x=a+b+c+d+e+f+g+h+i;
  
  if(N%x==0){
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}
}


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

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


int main(){
  int N, n, a, s = 0;

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


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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  int x = N/100000000+(N-N/100000000*100000000)/10000000+(N-N/10000000*10000000)/1000000+(N-N/1000000*1000000)/100000+(N-N/100000*100000)/10000+(N-N/10000*10000)/1000+(N-N/1000*1000)/100+(N-N/100*100)/10+N-N/10*10;
  int y = N/x;
  double z ==N/x;
  if(y==z){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: expected initializer before '==' token
    9 |   double z ==N/x;
      |            ^~
a.cc:10:9: error: 'z' was not declared in this scope
   10 |   if(y==z){
      |         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  int x = N/100000000+(N-N/100000000*100000000)/10000000+(N-N/10000000*10000000)/1000000+(N-N/1000000*1000000)/100000+(N-N/100000*100000)/10000+(N-N/10000*10000)/1000+(N-N/1000*1000)/100+(N-N/100*100)/10+N-N/10*10;
  if(int N/x == double N/x){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: expected initializer before '/' token
    8 |   if(int N/x == double N/x){
      |           ^
a.cc:8:11: error: expected ')' before '/' token
    8 |   if(int N/x == double N/x){
      |     ~     ^
      |           )
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  int x = N/100000000+(N-N/100000000*100000000)/10000000+(N-N/10000000*10000000)/1000000+(N-N/1000000*1000000)/100000+(N-N/100000*100000)/10000+(N-N/10000*10000)/1000+(N-N/1000*1000)/100+(N-N/100*100)/10+N-N/10*10
  if(int N/x == double N/x){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'if'
    8 |   if(int N/x == double N/x){
      |   ^~
a.cc:11:3: error: 'else' without a previous 'if'
   11 |   else{
      |   ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  cin >> int N;
  int x = N/100000000+(N-N/100000000*100000000)/10000000+(N-N/10000000*10000000)/1000000+(N-N/1000000*1000000)/100000+(N-N/100000*100000)/10000+(N-N/10000*10000)/1000+(N-N/1000*1000)/100+(N-N/100*100)/10+N-N/10*10
  if(int N/x == double N/x){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: expected primary-expression before 'int'
    5 |   cin >> int N;
      |          ^~~
a.cc:6:11: error: 'N' was not declared in this scope
    6 |   int x = N/100000000+(N-N/100000000*100000000)/10000000+(N-N/10000000*10000000)/1000000+(N-N/1000000*1000000)/100000+(N-N/100000*100000)/10000+(N-N/10000*10000)/1000+(N-N/1000*1000)/100+(N-N/100*100)/10+N-N/10*10
      |           ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:7: error: lvalue required as left operand of assignment
   13 |   if(x%N=0){
      |      ~^~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: expected ';' before 'for'
    7 |   x=0
      |      ^
      |      ;
    8 | 
    9 |   for(;N>0;N/=10) {
      |   ~~~ 
a.cc:9:17: error: expected ';' before ')' token
    9 |   for(;N>0;N/=10) {
      |                 ^
      |                 ;
a.cc:12:7: error: lvalue required as left operand of assignment
   12 |   if(x%N=0){
      |      ~^~
Language: C++

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

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


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

#include <bits/stdc++.h>
using namespace std;
int main() {
    int X;
    cin >> X;
    int fX=0;
    int y=X;
    while (ture){

        y /= 10;
        if
        fX += 
    }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: 'ture' was not declared in this scope
    8 |     while (ture){
      |            ^~~~
a.cc:12:9: error: expected '(' before 'fX'
   12 |         fX +=
      |         ^~
      |         (
Language: C++

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

int main(){
  int n,c,x,y;
  cin >> n;
  y=0;
  c=1;
  x=0;
  bool a=false;
  bool b=true;
  
  if(int i=0;i<9;i++){
    y=(n/c)%10;
    x+=y;
    c*=10;
  }
  if(n%x == 0){
    a=true;
    b=false;
  }
  if(a)
    cout << "Yes" << endl;
  if(b)
    cout << "No" << endl;
}
  
  
  


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

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

int main(){
  int n,c,x;
  cin >> n;
  c=1;
  x=0;
  bool a=false;
  bool b=true;
  
  if(int i=0;i<9;i++){
    y=(n/c)%10;
    x+=y;
    c*=10;
  }
  if(n%x == 0){
    a=true;
    b=false;
  }
  if(a)
    cout << "Yes" << endl;
  if(b)
    cout << "No" << endl;
}
  
  
  


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

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

Compiler output:
main.c: In function 'main':
main.c:7:31: error: expected ';' before 'else'
    7 |   if(N % c == 0) printf("Yes")
      |                               ^
      |                               ;
    8 |     else printf("No)
      |     ~~~~                       
main.c:8:17: warning: missing terminating " character
    8 |     else printf("No)
      |                 ^
main.c:8:17: error: missing terminating " character
    8 |     else printf("No)
      |                 ^~~~
main.c:9:1: error: expected declaration or statement at end of input
    9 | }
      | ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;++i)
using namespace std;
int sumEach(int n){
 int sum;
 while(n>0){sum+=n%10; n/10;}
  return sum;
}

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

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

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

int main() {
  int N, N2 ,N3;
  int s = 0;
  cin >> N;
  
  //N2のようにしなければNが0になって後々計算できなくなる
  N2 = N;
  while(N2 != 0){
  N2 /= 10;
  s = s + 1;
  }
  
  int fN = 0;
  
  N3 = N;
  for (int i = 0; i < s; i++) {
  M = N3 / (10**(i+1));
  fN = fN + M; 
  }
  
  int H;
  H = N / fN;
  if ( H ==0 ){
    cout << "Yes" << endl; }
  else if ( H != 0 ){
    cout << "No" <<endl; }
}  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:20:3: error: 'M' was not declared in this scope
   20 |   M = N3 / (10**(i+1));
      |   ^
a.cc:20:16: error: invalid type argument of unary '*' (have 'int')
   20 |   M = N3 / (10**(i+1));
      |                ^~~~~~
Language: C++

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

int main() {
  int N;
  int s = 0;
  cin >> N;
  
  //N2のようにしなければNが0になって後々計算できなくなる
  N2 = N;
  while(N2 != 0){
  N2 /= 10;
  s = s + 1;
  }
  
  int sum = 0
  
  for (int i = 0; i < s; i++) {
  M = N / (10**(i+1));
  sum = sum + M
  }
}  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'N2' was not declared in this scope; did you mean 'N'?
   10 |   N2 = N;
      |   ^~
      |   N
a.cc:18:3: error: expected ',' or ';' before 'for'
   18 |   for (int i = 0; i < s; i++) {
      |   ^~~
a.cc:18:19: error: 'i' was not declared in this scope
   18 |   for (int i = 0; i < s; i++) {
      |                   ^
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;
using P = pair<int,int>;
typedef long long ll;
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;

// head
int func(int N){
  if(N<10) return N;
} return func(N/10)+N%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:20:3: error: expected unqualified-id before 'return'
   20 | } return func(N/10)+N%10;
      |   ^~~~~~
a.cc: In function 'int func(int)':
a.cc:20:1: warning: control reaches end of non-void function [-Wreturn-type]
   20 | } return func(N/10)+N%10;
      | ^
Language: C++

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

int main() {
  int N;
  cin >> N;
  int rest = N;
  
  int divisor = 0;
  while (rest > 0) {
    int remainder;
    remainder = rest % 10;
    divisor += remainder;
    rest = (rest - remainder) / 10
  }
  
  if (N % divisor == 0) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}

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

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


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

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


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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'b' was not declared in this scope
    7 |   b = N;
      |   ^
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++){
	if(N==0)
      break;
    f += N%10;
    N = N/10
  }
  if(N%f==0)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}

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

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

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

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

#include<bits/stdc++.h>
using namespace std;
int func(int)

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

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

Compiler output:
a.cc:5:1: error: expected initializer before 'int'
    5 | int main(){
      | ^~~
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;
    return 0;
  }
  cout << "No" << endl;
  return 0;
}
int func(int N){
  if(N<0)
    return N;
  return func(N/10)+N%10;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: 'func' was not declared in this scope
    7 |   int s = func(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;
    return 0;
  }
  cout << "No" << endl;
  return 0;
}
func(int N){
  if(N<0)
    return N;
  return func(N/10)+N%10;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: 'func' was not declared in this scope
    7 |   int s = func(N);
      |           ^~~~
a.cc: At global scope:
a.cc:15:1: error: ISO C++ forbids declaration of 'func' with no type [-fpermissive]
   15 | func(int N){
      | ^~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: redeclaration of 'int L'
    8 |   int L;
      |       ^
a.cc:5:13: note: 'int L' previously declared here
    5 |   int N, M, L;
      |             ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: redeclaration of 'int L'
    8 |   int L = N;
      |       ^
a.cc:5:13: note: 'int L' previously declared here
    5 |   int N, M, L;
      |             ^