criyle/codenet-compile-errors huggingface dataset:
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;
      |             ^
a.cc:22:2: error: expected '}' at end of input
   22 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:21:2: error: expected '}' at end of input
   21 | }
      |  ^
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=0;
  cin >> 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:11:8: error: lvalue required as left operand of assignment
   11 |   if(N % f = 0)
      |      ~~^~~
Language: C++

￼￼#include<iostream>
using namespace std;
int main(){
  int a,b,c,d=0;
  cin >> a;
  c=a;
  while(a>0){
    b=a%10;
    d+=b;
    a/10;
  }
  if(c%d==0)cout << "Yes";
  else cout << "No";
}


Compiler output:
a.cc:1:3: error: stray '#' in program
    1 | ￼￼#include<iostream>
      |   ^
a.cc:1:1: error: '\U0000fffc\U0000fffc' does not name a type
    1 | ￼￼#include<iostream>
      | ^~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> a;
      |   ^~~
a.cc:12:13: error: 'cout' was not declared in this scope
   12 |   if(c%d==0)cout << "Yes";
      |             ^~~~
a.cc:13:8: error: 'cout' was not declared in this scope
   13 |   else cout << "No";
      |        ^~~~
Language: C++

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


Compiler output:
a.cc:1:3: error: stray '#' in program
    1 | ￼￼#include <bits/stdc++.h>
      |   ^
a.cc:1:1: error: '\U0000fffc\U0000fffc' does not name a type
    1 | ￼￼#include <bits/stdc++.h>
      | ^~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> a;
      |   ^~~
a.cc:12:13: error: 'cout' was not declared in this scope
   12 |   if(c%d==0)cout << "Yes";
      |             ^~~~
a.cc:13:8: error: 'cout' was not declared in this scope
   13 |   else cout << "No";
      |        ^~~~
Language: C++

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


Compiler output:
a.cc:1:3: error: stray '#' in program
    1 | ￼￼#include<bits/stdc++.h>
      |   ^
a.cc:1:1: error: '\U0000fffc\U0000fffc' does not name a type
    1 | ￼￼#include<bits/stdc++.h>
      | ^~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> a;
      |   ^~~
a.cc:12:13: error: 'cout' was not declared in this scope
   12 |   if(c%d==0)cout << "Yes";
      |             ^~~~
a.cc:13:8: error: 'cout' was not declared in this scope
   13 |   else cout << "No";
      |        ^~~~
Language: C++

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

Compiler output:
a.cc:1:3: error: stray '#' in program
    1 | ￼￼#include<bits/stdc++.h>
      |   ^
a.cc:1:1: error: '\U0000fffc\U0000fffc' does not name a type
    1 | ￼￼#include<bits/stdc++.h>
      | ^~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> a;
      |   ^~~
a.cc:12:13: error: 'cout' was not declared in this scope
   12 |   if(c%d==0)cout << "Yes";
      |             ^~~~
a.cc:13:8: error: 'cout' was not declared in this scope
   13 |   else cout << "No";
      |        ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:3:29: error: expected primary-expression before 'for'
    3 | int main(){int n,s=0;cin>>n,for(int i=1;i<=n;i*=10)s+=n/i%10;if(n%s)cout<<"No"<<endl;else cout<<"Yes"<<endl;}
      |                             ^~~
a.cc:3:41: error: 'i' was not declared in this scope
    3 | int main(){int n,s=0;cin>>n,for(int i=1;i<=n;i*=10)s+=n/i%10;if(n%s)cout<<"No"<<endl;else cout<<"Yes"<<endl;}
      |                                         ^
Language: C++

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:3:98: error: 'elsecout' was not declared in this scope
    3 | int main(){int sum=0,n,N;cin>>n;N=n;while(n!=0){sum+=n%10;n=(n-n%10)/10;}if(N%sum==0)cout<<"Yes";elsecout<<"No";}
      |                                                                                                  ^~~~~~~~
Language: C++

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

int main(){
  int N, S, sum;
  cin >> N;
  S = N.size();
  sum = 0;
  for (int i = 0; i < S; i++) {
    int A;
    cin >> A;
    sum += A;
  }
  double T;
  T = N % sum;
  
  if(T == 0){
    cout << "Yes" << endl;
  }
  
  else {
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: request for member 'size' in 'N', which is of non-class type 'int'
    7 |   S = N.size();
      |         ^~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: expected initializer before '.' token
    5 |   int N,M.f=0;
      |          ^
a.cc:8:3: error: 'M' was not declared in this scope
    8 |   M=N;
      |   ^
a.cc:11:5: error: 'f' was not declared in this scope
   11 |     f+=M%10;
      |     ^
Language: C++

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

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclued; did you mean #include?
    1 | #inclued<bits/stdc++.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin>>N;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inclued<bits/stdc++.h>
a.cc:19:5: error: 'cout' was not declared in this scope
   19 |     cout<<"Yes"<<endl;
      |     ^~~~
a.cc:19:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:18: error: 'endl' was not declared in this scope
   19 |     cout<<"Yes"<<endl;
      |                  ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #inclued<bits/stdc++.h>
a.cc:22:5: error: 'cout' was not declared in this scope
   22 |     cout<<"No"<<endl;
      |     ^~~~
a.cc:22:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:22:17: error: 'endl' was not declared in this scope
   22 |     cout<<"No"<<endl;
      |                 ^~~~
a.cc:22:17: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

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

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incled; did you mean #include?
    1 | #incled<bits/stdc++.h>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin>>N;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incled<bits/stdc++.h>
a.cc:19:5: error: 'cout' was not declared in this scope
   19 |     cout<<"Yes"<<endl;
      |     ^~~~
a.cc:19:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:18: error: 'endl' was not declared in this scope
   19 |     cout<<"Yes"<<endl;
      |                  ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #incled<bits/stdc++.h>
a.cc:22:5: error: 'cout' was not declared in this scope
   22 |     cout<<"No"<<endl;
      |     ^~~~
a.cc:22:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:22:17: error: 'endl' was not declared in this scope
   22 |     cout<<"No"<<endl;
      |                 ^~~~
a.cc:22:17: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

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

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incled; did you mean #include?
    1 | #incled<bits/stdc++.h>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin>>N;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incled<bits/stdc++.h>
a.cc:8:3: error: expected ',' or ';' before 'for'
    8 |   for(int i=0;i<9;i++){
      |   ^~~
a.cc:8:15: error: 'i' was not declared in this scope
    8 |   for(int i=0;i<9;i++){
      |               ^
a.cc:19:5: error: 'cout' was not declared in this scope
   19 |     cout<<"Yes"<<endl;
      |     ^~~~
a.cc:19:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:18: error: 'endl' was not declared in this scope
   19 |     cout<<"Yes"<<endl;
      |                  ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #incled<bits/stdc++.h>
a.cc:22:5: error: 'cout' was not declared in this scope
   22 |     cout<<"No"<<endl;
      |     ^~~~
a.cc:22:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:22:17: error: 'endl' was not declared in this scope
   22 |     cout<<"No"<<endl;
      |                 ^~~~
a.cc:22:17: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

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

int main() {
  int X;
  cin>>X;
  int N=X;
  int i=0;
  int x=0;
  while(N!=0){
    N/=10;
    i++;
  }
  for(int j=0;j<i;j++){
    x+=(X%10);
    X/=10;
  }
  if(X/x=(X+x-1)/x){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:7: error: lvalue required as left operand of assignment
   18 |   if(X/x=(X+x-1)/x){
      |      ~^~
Language: C++

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

thesumofdigits (int N) {
  int sum;
  while(N>0){
    int d=N%10;
    sum+=d;
    N/=10;
  }
  return sum;
}

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

Compiler output:
a.cc:4:1: error: ISO C++ forbids declaration of 'thesumofdigits' with no type [-fpermissive]
    4 | thesumofdigits (int N) {
      | ^~~~~~~~~~~~~~
Language: C++

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

thesumofdigits (int N) {
  int sum;
  while(N>0){
    int d=N%10;
    sum+=d;
    N/=10;
  }
}

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

Compiler output:
a.cc:4:1: error: ISO C++ forbids declaration of 'thesumofdigits' with no type [-fpermissive]
    4 | thesumofdigits (int N) {
      | ^~~~~~~~~~~~~~
a.cc: In function 'int thesumofdigits(int)':
a.cc:11:1: warning: no return statement in function returning non-void [-Wreturn-type]
   11 | }
      | ^
a.cc: In function 'int main()':
a.cc:19:7: error: lvalue required as left operand of assignment
   19 |   if(N%ha=0) cout << "Yes" << endl;
      |      ~^~~
Language: C++

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

thesumofdigits (int) {
  int sum;
  while(N>0){
    int d=N%10;
    sum+=d;
    N/=10;
  }

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

Compiler output:
a.cc:4:1: error: ISO C++ forbids declaration of 'thesumofdigits' with no type [-fpermissive]
    4 | thesumofdigits (int) {
      | ^~~~~~~~~~~~~~
a.cc: In function 'int thesumofdigits(int)':
a.cc:6:9: error: 'N' was not declared in this scope
    6 |   while(N>0){
      |         ^
a.cc:12:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   12 | int main(){
      |         ^~
a.cc:12:9: note: remove parentheses to default-initialize a variable
   12 | int main(){
      |         ^~
      |         --
a.cc:12:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:12:11: error: a function-definition is not allowed here before '{' token
   12 | int main(){
      |           ^
a.cc:21:2: error: expected '}' at end of input
   21 | }
      |  ^
a.cc:4:22: note: to match this '{'
    4 | thesumofdigits (int) {
      |                      ^
a.cc:21:2: warning: no return statement in function returning non-void [-Wreturn-type]
   21 | }
      |  ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
 
  string a;
  cin >> a;
  int count = 0;
  int num = 0;
  while(count < a.length) {
    num += a[count];
    count ++;
  }  
  if (num % std::stoi(a) == 0) {
      cout << "Yes" << endl;
  } else {
      cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   10 |   while(count < a.length) {
      |                 ~~^~~~~~
      |                         ()
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
 
  string a;

  int count = 0;
  int num;
  while(count < a.length) {
    num += a[count];
    count ++;
  }  
  if (num % std::stoi(a) == 0) {
      cout << "Yes" << endl;
  } else {
      cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   10 |   while(count < a.length) {
      |                 ~~^~~~~~
      |                         ()
Language: C++

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

int main() 
{
  int n , a = 0;
  cin >> n;
  
  for (int i = 1 ; n >= i ; i*10 )
  {
    a += n % i
  }
  
  cout << a << endl;
}
    
    
  


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

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

int main() 
{
  int n , a = 0;
  cin >> n;
  
  for(i=1 ; n >= i ; i*10 )
  {
    a += n % i
  }
  
  cout << a << endl;
}
    
    
  

Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: 'i' was not declared in this scope
    9 |   for(i=1 ; n >= i ; i*10 )
      |       ^
Language: C++

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

bool judge(int X){
  int count = 0;
  while(X > 0){
    count += X % 10;
    X -= X % 10;
    X /= 10;
  }
  if(count == X) {
    return true;
  }else{
    return false;
  }
}

int main(){
  int X;
  cin >> X;
  if(judge(X)){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
  
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespce'
    2 | using namespce std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:20:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   20 |   cin >> X;
      |   ^~~
      |   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:22:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   22 |     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:22:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   22 |     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:24:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   24 |     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:24:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   24 |     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,F,num;
  cin >> N;
  for(int i = 0;i < 8;i++)
   	F +=  (N % pow(10,i+1) - N % pow(10,i)) / pow(10,i); //i+1桁目の数値を求める
  if(N % F == 0)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
    8 |         F +=  (N % pow(10,i+1) - N % pow(10,i)) / pow(10,i); //i+1桁目の数値を求める
      |                ~ ^ ~~~~~~~~~~~
      |                |      |
      |                int    __gnu_cxx::__promote<double>::__type {aka double}
a.cc:8:36: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
    8 |         F +=  (N % pow(10,i+1) - N % pow(10,i)) / pow(10,i); //i+1桁目の数値を求める
      |                                  ~ ^ ~~~~~~~~~
      |                                  |      |
      |                                  int    __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

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

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

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

int main() {
  int x;
  cin >> x ;
  int sen , syaku, ju, ichi, itimann , zyuumann, syakumann , sennmann, ioku;   
  ioku = x / 100000000;
  x = x %   100000000;
  sennmann = x / 10000000;
  x = x %   10000000;
  syakumann = x / 1000000;
  x = x %　 1000000;
  zyuumann = x /100000;
  x = x %  100000;
  itimann = x / 10000;
  x = x %  10000;
  sen = x / 1000;
  x = x % 1000;
  syaku = x / 100;
  x = x %  100;
  ju = x /10;
  x = x % 10;
  ichi = x / 1;
if (sen == syaku && syaku == ju){
  cout << "Yes" << endl;
}
  else if ( ju == syaku && syaku == ichi ){
    cout << "Yes"<< endl;
  }
  else  cout << "No" <<endl;
  }




Compiler output:
a.cc:13:10: error: extended character 　 is not valid in an identifier
   13 |   x = x %　 1000000;
      |          ^
a.cc: In function 'int main()':
a.cc:13:10: error: '\U00003000' was not declared in this scope
   13 |   x = x %　 1000000;
      |          ^~
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,a,f == 0;
  cin>>n;
  a = n;
  while(n!=0){
  f += n % 10;
  n /= 10;
  }
  cout << (a%f==0 ? "Yes" : "No") << endl; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: expected initializer before '==' token
    6 |   int n,a,f == 0;
      |             ^~
a.cc:10:3: error: 'f' was not declared in this scope
   10 |   f += n % 10;
      |   ^
a.cc:13:14: error: 'f' was not declared in this scope
   13 |   cout << (a%f==0 ? "Yes" : "No") << endl;
      |              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  int a, A, b, B, c, C, d, D, e, E, f, F, g, G, h, H, i;
  a = N / 100000000;
  A = a * 100000000;
  b = N % A / 10000000;
  B = b * 10000000;
  c = N % A % B / 1000000;
  C = c * 1000000;
  d = N % A % B % C / 100000;
  D = d * 100000;
  e = N % A % B % C % D / 10000;
  E = e * 10000;
  f = N % A % B % C % D % E / 1000;
  F = f * 1000;
  g = N % A % B % C % D % E % F / 100;
  G = g * 100;
  h = N % A % B % C % D % E % F % G / 10;
  H = h * 10
  i = N % A % B % C % D % E % F % G % H;
  int M = a + b + c + d + e + f + g + h + i;
  if (N % M == 0)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:13: error: expected ';' before 'i'
   23 |   H = h * 10
      |             ^
      |             ;
   24 |   i = N % A % B % C % D % E % F % G % H;
      |   ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  int a, b, c, d, e, f, g, h, i;
  a = N / 100000000;
  b = N % a / 10000000;
  c = N % b % a / 1000000;
  d = N % a % b % c / 100000;
  e = N % a % b % c % d / 10000;
  f = N % a % b % c % d % e / 1000;
  g = N % a % b % c % d % e % f / 100;
  h = N % a % b % c % d % e % f % g / 10;
  i = N % a % b % c % d % e % f % g % h;
  int A = a + b + c + d + e + f + g + h + i;
  if (N % A == 0)
    cout << Yes << endl;
  else
    cout << No << endl;
}

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

n = int(input())
s = str(n)
t = 0
for i in s:
  t += int(i)
if n % t == 0:
  print("Yes")
else:
  print("No")

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

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

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

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

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


}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: expected primary-expression before ';' token
   11 |     t+=;
      |        ^
Language: C++

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

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


}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: expected primary-expression before ';' token
   11 |     t+=;
      |        ^
a.cc:12:10: error: expected ';' before '}' token
   12 |     N/=10
      |          ^
      |          ;
   13 |   }
      |   ~
Language: C++

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

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


}


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

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

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


}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: expected ';' before 'while'
    8 |   pN=N
      |       ^
      |       ;
    9 |   while(N>0){
      |   ~~~~~
a.cc:14:8: error: lvalue required as left operand of assignment
   14 |   if(pN%t=0){
      |      ~~^~
Language: C++

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

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


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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:23: error: expected ';' before ')' token
    7 |   for (i = 0,i < 8;i++) {
      |                       ^
      |                       ;
a.cc:8:18: error: expected ';' before 'N'
    8 |     sum += N % 10
      |                  ^
      |                  ;
    9 |     N = N / 10
      |     ~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: expected ';' before 'b'
    7 |   A = 0
      |        ^
      |        ;
    8 |   b = N
      |   ~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: expected ';' before 'b'
    7 |   A = 0
      |        ^
      |        ;
    8 |   b = N
      |   ~     
a.cc: At global scope:
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C++

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

int main() {
  int N, A;
  cin >> N;
 
  A = N / 10 + n % 10;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: 'n' was not declared in this scope
    8 |   A = N / 10 + n % 10;
      |                ^
a.cc:10:9: error: lvalue required as left operand of assignment
   10 |   if (N % A = 0;) {
      |       ~~^~~
a.cc:10:17: error: expected primary-expression before ')' token
   10 |   if (N % A = 0;) {
      |                 ^
Language: C++

#include<bits/stdc++.h>

int main(){
  int N;
  cin>>N;
  
  int sum = 0;
  
  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:5:3: 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:15:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   15 |     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:15:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   15 |     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:18:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   18 |     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:18:17: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   18 |     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<stdio.h>
using namespace std;
int main(){
  int n,i;
  int k=1;
  int sum=0;
  cin >> n;
  for(i=1;i<=8;i++){
    if(i==1){sum+=n%k*10;}
    sum+=n/k;
    if(n<k*10){
      break;
    }
    k*10;
  }
  if(n%sum==0){
    cout << "Yes";
  }else{
    cout << "No";
  }
  return 0;
}

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

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

int main() {
int N,S;
cin >>N;
S=0;
rep(i,N+1){
  S+=(N%10**(i+1)-N%10**i)/10**i;
  if (N/10**i==0){
  break;
  }

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


}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: invalid type argument of unary '*' (have 'int')
   10 |   S+=(N%10**(i+1)-N%10**i)/10**i;
      |            ^~~~~~
a.cc:10:24: error: invalid type argument of unary '*' (have 'int')
   10 |   S+=(N%10**(i+1)-N%10**i)/10**i;
      |                        ^~
a.cc:10:31: error: invalid type argument of unary '*' (have 'int')
   10 |   S+=(N%10**(i+1)-N%10**i)/10**i;
      |                               ^~
a.cc:11:12: error: invalid type argument of unary '*' (have 'int')
   11 |   if (N/10**i==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,S;
cin >>N;
S=0;
rep(i,N+1){
  S+=(N%10**(i+1)-N%10**i)/10**i;
  if (N/10**i==0){
  break
  }

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


}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: invalid type argument of unary '*' (have 'int')
   10 |   S+=(N%10**(i+1)-N%10**i)/10**i;
      |            ^~~~~~
a.cc:10:24: error: invalid type argument of unary '*' (have 'int')
   10 |   S+=(N%10**(i+1)-N%10**i)/10**i;
      |                        ^~
a.cc:10:31: error: invalid type argument of unary '*' (have 'int')
   10 |   S+=(N%10**(i+1)-N%10**i)/10**i;
      |                               ^~
a.cc:11:12: error: invalid type argument of unary '*' (have 'int')
   11 |   if (N/10**i==0){
      |            ^~
a.cc:12:8: error: expected ';' before '}' token
   12 |   break
      |        ^
      |        ;
   13 |   }
      |   ~
Language: C++

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

int main() {

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: error: expected ';' before '{' token
   14 |   (N%t==0){
      |           ^
      |           ;
a.cc:16:4: error: 'else' without a previous 'if'
   16 |   }else{
      |    ^~~~
Language: C++

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

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

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

#include <bits/stdc++.h>
#define ALL(obj) begin(obj), end(obj)
#define debug(x) cerr << #x << ": " << x << '\n'
using namespace std;
template <class T>
vector<T> make_vec(size_t a) {
    return vector<T>(a);
}
template <class T, class... Ts>
auto make_vec(size_t a, Ts... ts) {
    return vector<decltype(make_vec<T>(ts...))>(a, make_vec<T>(ts...));
}
template <class T>
bool chmax(T &a, const T &b) {
    if (a < b) {
        a = b;
        return 1;
    }
    return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
    if (b < a) {
        a = b;
        return 1;
    }
    return 0;
}

using ll = long long;
using ull = unsigned long long;
const int INF = 2100100100;
// const int MOD = 1e9 + 7;

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


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

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

int main() {
  int N;
  cin N;
  int sum = 0;
  sum += N / 100000000
  sum += (N % 100000000 - N % 10000000) / 10000000;
  sum += (N % 10000000 - N % 1000000) / 1000000;
  sum += (N % 1000000 - N % 100000) / 100000;
  sum += (N % 100000 - N % 10000) / 10000;
  sum += (N % 10000 - N % 1000) / 1000;
  sum += (N % 1000 - N % 100) / 100;
  sum += (N % 100 - N % 10) / 10;
  sum += N % 10;
  N %= sum;
  
  if (N != 0) {
    cout << "No" << endl;
  }
  
  else {
    cout << "Yes" << endl;
  }
 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'N'
    6 |   cin N;
      |      ^~
      |      ;
a.cc:8:23: error: expected ';' before 'sum'
    8 |   sum += N / 100000000
      |                       ^
      |                       ;
    9 |   sum += (N % 100000000 - N % 10000000) / 10000000;
      |   ~~~
Language: C++

#include <iostream>
using namespace std;
int main(){ 
 int n;
 cin >> n;
  int a=0;
  int b=n;
  for(int i=0;i<9;i++){
    a += (b%10);
    b /= 10;
  };
  
  if(n%a == 0){
  cout<<"Yes"<<endl;
  }
  else(n%a != 0){
  cout<<"No"<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: expected ';' before '{' token
   16 |   else(n%a != 0){
      |                 ^
      |                 ;
Language: C++

#include <iostream>
using namespace std;
int main(){ 
 int n;
 cin >> n;
  int a=0;
  int b=n;
  for(int i=0;i<9;i++){
    a += (b%10);
    b /= 10;
  }
  
  if(n%a == 0){
  cout<<"Yes"<<endl;
  }
  else(n%a != 0){
  cout<<"No"<<endl;
  };
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: expected ';' before '{' token
   16 |   else(n%a != 0){
      |                 ^
      |                 ;
Language: C++

#include <iostream>
using namespace std;
int main(){ 
 int n;
 cin >> n;
  int a=0;
  int b=n;
  for(int i=0;i<9;i++){
    a += (b%10);
    b /= 10;
  }
  
  if(n%a == 0){
  cout<<"Yes"<<endl;
  };
  else(n%a != 0){
  cout<<"No"<<endl;
  };
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:3: error: 'else' without a previous 'if'
   16 |   else(n%a != 0){
      |   ^~~~
a.cc:16:17: error: expected ';' before '{' token
   16 |   else(n%a != 0){
      |                 ^
      |                 ;
Language: C++

#include <iostream>
using namespace std;
int main(){ 
 int n;
 cin >> n;
  int a=0;
  int b=n;
  for(int i=0;i<9;i++){
    a += (b%10);
    b /= 10;
  }
  
  if(n%a == 0){
  cout<<"Yes"<<endl;
  }
  else(n%a != 0){
  cout<<"No"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: expected ';' before '{' token
   16 |   else(n%a != 0){
      |                 ^
      |                 ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int N,M,a,b,c,d,e,f,g,h,A;
  N==100000000*A+10000000*a+1000000*b+100000*c+10000*d+1000*e+100*f+10*g+h;
  M==A+a+b+c+d+e+f+g+h;
  0<N<100000001;
  0<=a,b,c,d,e,f,g,h<10;
    0<=A<=1;
  cin>>N;
 
  if(N%M==0){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
}
#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int N,M,a,b,c,d,e,f,g,h,A;
  N==100000000*A+10000000*a+1000000*b+100000*c+10000*d+1000*e+100*f+10*g+h;
  M==A+a+b+c+d+e+f+g+h;
  0<N<100000001;
  0<=a,b,c,d,e,f,g<10;
  0<h<10;
    0<=A<=1;
  cin>>N;
 
  if(N%M==0){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
}


Compiler output:
a.cc:23:5: error: redefinition of 'int main()'
   23 | int main(){
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main(){
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int N,M,a,b,c,d,e,f,g,h;
  N==100000000*A+10000000*a+1000000*b+100000*c+10000*d+1000*e+100*f+10*g+h;
  M==A+a+b+c+d+e+f+g+h;
  0<N<100000001;
  cin>>N;
 
  if(N%M==0){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
}
#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int N,M,a,b,c,d,e,f,g,h,A;
  N==100000000*A+10000000*a+1000000*b+100000*c+10000*d+1000*e+100*f+10*g+h;
  M==A+a+b+c+d+e+f+g+h;
  0<N<100000001;
  cin>>N;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: 'A' was not declared in this scope
    6 |   N==100000000*A+10000000*a+1000000*b+100000*c+10000*d+1000*e+100*f+10*g+h;
      |                ^
a.cc: At global scope:
a.cc:21:5: error: redefinition of 'int main()'
   21 | int main(){
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main(){
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int N,M,a,b,c,d,e,f,g,h;
  N==100000000*A+10000000*a+1000000*b+100000*c+10000*d+1000*e+100*f+10*g+h;
  M==A+a+b+c+d+e+f+g+h;
  0<N<100000001;
  cin>>N;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: 'A' was not declared in this scope
    6 |   N==100000000*A+10000000*a+1000000*b+100000*c+10000*d+1000*e+100*f+10*g+h;
      |                ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int N,M,a,b,c,d,e,f,g,h;
  N==10000000*a+1000000*b+100000*c+10000*d+1000*e+100*f+10*g+h;
  M==a+b+c+d+e+f+g+h;
  0<=a,b,c,d,e,f,g<=9;
 0<h<=9
  cin>>N;
  if(N%M==0){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
}

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

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int N,M,a,b,c,d,e,f,g,h;
  N==10000000*a+1000000*b+100000*c+10000*d+1000*e+100*f+10*g+h;
  M==a+b+c+d+e+f+g+h;
  0<=a,b,c,d,e,f,g,h<=9;
  cin>>N;
  if(N%M=0){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
}

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

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

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

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #includde; did you mean #include?
    1 | #includde <bits/stdc++.h>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:9:3: error: 'cin' was not declared in this scope
    9 |   cin>>N;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #includde <bits/stdc++.h>
a.cc:10:7: error: lvalue required as left operand of assignment
   10 |   if(N%M=0){
      |      ~^~
a.cc:11:5: error: 'cout' was not declared in this scope
   11 |     cout<<"Yes"<<endl;
      |     ^~~~
a.cc:11:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:18: error: 'endl' was not declared in this scope
   11 |     cout<<"Yes"<<endl;
      |                  ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #includde <bits/stdc++.h>
a.cc:14:5: error: 'cout' was not declared in this scope
   14 |     cout<<"No"<<endl;
      |     ^~~~
a.cc:14:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:17: error: 'endl' was not declared in this scope
   14 |     cout<<"No"<<endl;
      |                 ^~~~
a.cc:14:17: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

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

int main() {
  string s;
  cin >> s;
  int n = atoi(s);
  int digits = 0;
  for (int i=0; i<s.length(); i++) digits += int(s[i]) - 48;
  if (n%digits == 0) cout << "Yes";
  else cout << "No";
}

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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:16:12: error: lvalue required as left operand of assignment
   16 |     if ( N % sum = 0 )
      |          ~~^~~~~
a.cc:18:26: error: expected primary-expression before ';' token
   18 |         cout << "Yes" << ;
      |                          ^
a.cc:21:29: error: expected primary-expression before ';' token
   21 |     else    cout << "No" << ;
      |                             ^
Language: C++

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


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

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

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