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

#include <bits/stdc++.h> 
using namespace std; 
int main() { 
  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:5:1: error: extended character 　 is not valid in an identifier
    5 | 　while (t >0) {
      | ^
a.cc:8:1: error: extended character 　 is not valid in an identifier
    8 | 　if (N % c ==0) puts ("Yes");
      | ^
a.cc: In function 'int main()':
a.cc:4:9: error: 'N' was not declared in this scope
    4 |   int t=N , c=0;
      |         ^
a.cc:5:1: error: '\U00003000while' was not declared in this scope
    5 | 　while (t >0) {
      | ^~~~~~~
a.cc:8:11: error: 'c' was not declared in this scope
    8 | 　if (N % c ==0) puts ("Yes");
      |           ^
a.cc:8:1: error: '\U00003000if' was not declared in this scope
    8 | 　if (N % c ==0) puts ("Yes");
      | ^~~~
a.cc:9:3: error: 'else' without a previous 'if'
    9 |   else puts ("No")
      |   ^~~~
a.cc:9:19: error: expected ';' before '}' token
    9 |   else puts ("No")
      |                   ^
      |                   ;
   10 | }
      | ~
Language: C++

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

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

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

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

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

int main() {
  int N, x;
  cin >> N;
  x = 1
  if (int i = 0; i < 8
}


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

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

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

#include <bits/stdc++.h>

using namespace std;

int main(){

	int N, X;

	cin >> N;

	X = N/100000000 + N/10000000%10 + N/1000000%10 + N/100000%10 + N/10000%10 + N/1000%10 + N/100%10 + N/10%10 + N%10;

	if ( N % X == 0 ){
		cout << "Yes" << endl;
	}

	else if
		cout << "No" << endl;
}

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

#include <bits/stdc++.h>

using namespace std;

int main(){

	int N, X;

	cin >> N;

	X = N/100000000 + N/10000000%10 + N/1000000%10 + N/100000%10 + N/10000%10 + N/1000%10 + N/100%10 + N/10%10 + N%10;

	if ( N % X == 0 ){
		cout << "Yes" << endl;
	}

	else if{
		cout << "No" << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:16: error: expected '(' before '{' token
   17 |         else if{
      |                ^
      |                (
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(){

	int N, X;

	cin >> N;

	X = N/100000000 + N/10000000%10 + N/1000000%10 + N/100000%10 + N/10000%10 + N/1000%10 + N/100%10 + N/10%10 + N%10;

	if ( N % X == 0 )
		cout << "Yes" << endl;

	else if
		cout << "No" << endl;
}

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: 'pow' was not declared in this scope
   10 |         if(n<pow(10,i)){
      |              ^~~
Language: C++

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


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

include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N ;
  int c = 0;
  for ( int i=0 ; N > 0 ; i++ ) {
    int l ; 
    l = N%10 ;
    c += l ;
    N = (N-l)/10;
  }
  cout << (N % c =0 ? "Yes": "No") << endl;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> N ;
      |   ^~~
a.cc:14:3: error: 'cout' was not declared in this scope
   14 |   cout << (N % c =0 ? "Yes": "No") << endl;
      |   ^~~~
a.cc:14:14: error: lvalue required as left operand of assignment
   14 |   cout << (N % c =0 ? "Yes": "No") << endl;
      |            ~~^~~
a.cc:14:39: error: 'endl' was not declared in this scope
   14 |   cout << (N % c =0 ? "Yes": "No") << endl;
      |                                       ^~~~
Language: C++

include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N ;
  int c = 0;
  for ( int i=0 ; N > 0 ; i++ ) {
    int l ; 
    l = N%10 ;
    c += l ;
    N = (N-l)/10
  }
  cout << (N % c =0 ? "Yes": "No") << endl;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> N ;
      |   ^~~
a.cc:12:17: error: expected ';' before '}' token
   12 |     N = (N-l)/10
      |                 ^
      |                 ;
   13 |   }
      |   ~              
a.cc:14:3: error: 'cout' was not declared in this scope
   14 |   cout << (N % c =0 ? "Yes": "No") << endl;
      |   ^~~~
a.cc:14:14: error: lvalue required as left operand of assignment
   14 |   cout << (N % c =0 ? "Yes": "No") << endl;
      |            ~~^~~
a.cc:14:39: error: 'endl' was not declared in this scope
   14 |   cout << (N % c =0 ? "Yes": "No") << endl;
      |                                       ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{ string s;
long long d,num=0,sum=0;
int t;
cin>>t;
while(t--){
cin>>s;
for(int i=1 ; i<s.size() ; i++){
        num=0;
     d = s[i] - '0';
    num = num * 10 + d;
sum+=d;
}
if(num%(sum)==0) cout<< "Yes"<<  endl;
if(num%(sum)!=0) cout<< "N0"<<  endl;
}
return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:19:10: error: expected '}' at end of input
   19 | return 0;
      |          ^
a.cc:4:1: note: to match this '{'
    4 | { string s;
      | ^
Language: C++

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

int main() {
  int N;
  cin >> N;
  
  int a = (N % 10);
  int b = (((N-a)/10)%10);
  int c = ((N-10*b-a)/10%10);
  int d = (N-10*10*c-10*b-a)/10%10;
  int e = (N-10*10*10*d-10*10*c-10*b-a)/10%10;
  int f = (N-10*10*10*10*e-10*10*10*d-10*10*c-10*b-a)/10%10;
  int g = (N-10*10*10*10*10*f-10*10*10*10*e-10*10*10*d-10*10*c-10*b-a)/10%10;
  int h = (N-10*10*10*10*10*10*g-10*10*10*10*10*f-10*10*10*10*e-10*10*10*d-10*10*c-10*b-a);
  int i = (N-10*10*10*10*10*10*10*h-10*10*10*10*10*10*g-10*10*10*10*10*f-10*10*10*10*e-10*10*10*d-10*10*c-10*b-a);
  
  if (N % (a+b+c+d+e+f+g+h+i)=0) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:9: error: lvalue required as left operand of assignment
   18 |   if (N % (a+b+c+d+e+f+g+h+i)=0) {
      |       ~~^~~~~~~~~~~~~~~~~~~~~
Language: C++

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

int main() {
  int N;
  cin >> N;
  
  int a = (N % 10);
  int b = (((N-a)/10)%10);
  int c = ((N-10*b-a)/10%10);
  int d = (N-10*10*c-10*b-a)/10%10;
  int e = (N-10*10*10*d-10*10*c-10*b-a)/10%10;
  int f = (N-10*10*10*10*e-10*10*10*d-10*10*c-10*b-a)/10%10;
  int g = (N-10*10*10*10*10*f-10*10*10*10*e-10*10*10*d-10*10*c-10*b-a)/10%10;
  int h = (N-10*10*10*10*10*10*g-10*10*10*10*10*f-10*10*10*10*e-10*10*10*d-10*10*c-10*b-a);
  int i = (N-10*10*10*10*10*10*10*h-10*10*10*10*10*10*g-10*10*10*10*10*f-10*10*10*10*e-10*10*10*d-10*10*c-10*b-a);
  
  if (N/(a+b+c+d+e+f+g+h+i)=0) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:8: error: lvalue required as left operand of assignment
   18 |   if (N/(a+b+c+d+e+f+g+h+i)=0) {
      |       ~^~~~~~~~~~~~~~~~~~~~
Language: C++

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

int main() {
  int N;
  cin >> N;
  
  int a = (N % 10);
  int b = ((N-a)/10)%10);
  int c = (N-10*b-a)/10%10);
  int d = (N-10*10*c-10*b-a)/10%10;
  int e = (N-10*10*10*d-10*10*c-10*b-a)/10%10;
  int f = (N-10*10*10*10*e-10*10*10*d-10*10*c-10*b-a)/10%10;
  int g = (N-10*10*10*10*10*f-10*10*10*10*e-10*10*10*d-10*10*c-10*b-a)/10%10;
  int h = (N-10*10*10*10*10*10*g-10*10*10*10*10*f-10*10*10*10*e-10*10*10*d-10*10*c-10*b-a);
  int i = (N-10*10*10*10*10*10*10*h-10*10*10*10*10*10*g-10*10*10*10*10*f-10*10*10*10*e-10*10*10*d-10*10*c-10*b-a);
  
  if (N/(a+b+c+d+e+f+g+h+i)=0) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:24: error: expected ',' or ';' before ')' token
    9 |   int b = ((N-a)/10)%10);
      |                        ^
a.cc:10:27: error: expected ',' or ';' before ')' token
   10 |   int c = (N-10*b-a)/10%10);
      |                           ^
a.cc:18:8: error: lvalue required as left operand of assignment
   18 |   if (N/(a+b+c+d+e+f+g+h+i)=0) {
      |       ~^~~~~~~~~~~~~~~~~~~~
Language: C++

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

int main() {
  int N;
  cin >> N;
  
  int a = (N % 10)
  int b = (((N-a)/10)%10)
  int c = (N-10*b-a)/10%10)
  int d = (N-10*10*c-10*b-a)/10%10
  int e = (N-10*10*10*d-10*10*c-10*b-a)/10%10
  int f = (N-10*10*10*10*e-10*10*10*d-10*10*c-10*b-a)/10%10
  int g = (N-10*10*10*10*10*f-10*10*10*10*e-10*10*10*d-10*10*c-10*b-a)/10%10
  int h = (N-10*10*10*10*10*10*g-10*10*10*10*10*f-10*10*10*10*e-10*10*10*d-10*10*c-10*b-a)
  int i = (N-10*10*10*10*10*10*10*h-10*10*10*10*10*10*g-10*10*10*10*10*f-10*10*10*10*e-10*10*10*d-10*10*c-10*b-a)
  
  if (N/(a+b+c+d+e+f+g+h+i)=0) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'int'
    9 |   int b = (((N-a)/10)%10)
      |   ^~~
a.cc:21:3: error: 'else' without a previous 'if'
   21 |   else {
      |   ^~~~
Language: C++

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

int main() {
  int N;
  cin >> N;
  
  int a = (N % 10)
  int b = (((N-a)/10)%10)
  int c = (((N-10*b-a))/10%10)
  int d = (N-10*10*c-10*b-a)/10%10
  int e = (N-10*10*10*d-10*10*c-10*b-a)/10%10
  int f = (N-10*10*10*10*e-10*10*10*d-10*10*c-10*b-a)/10%10
  int g = (N-10*10*10*10*10*f-10*10*10*10*e-10*10*10*d-10*10*c-10*b-a)/10%10
  int h = (N-10*10*10*10*10*10*g-10*10*10*10*10*f-10*10*10*10*e-10*10*10*d-10*10*c-10*b-a)
  int i = (N-10*10*10*10*10*10*10*h-10*10*10*10*10*10*g-10*10*10*10*10*f-10*10*10*10*e-10*10*10*d-10*10*c-10*b-a)
  
  if (N/(a+b+c+d+e+f+g+h+i)=0) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'int'
    9 |   int b = (((N-a)/10)%10)
      |   ^~~
a.cc:21:3: error: 'else' without a previous 'if'
   21 |   else {
      |   ^~~~
Language: C++

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

int main() {
	int N, X;

	cin >> N;

	
	X = N %100000000 + N/10 %10000000 + N /100 %1000000 + N /1000 %100000 + N /10000 %10000 + N /100000 %1000 + N /100000 %100 + N /10000000 %10 + N /100000000;

	if ( N % X = 0 )
		cout << "Yes" << endl;

	else
		cout << "No" << endl;
}


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

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

int main() {
	int N, X;

	cin >> N;

	
	X = N %100000000 + N/10 %10000000 + N /100 %1000000 + N /1000 %100000 + N /10000 %10000 + N /100000 %1000 + N /100000 %100 + N /10000000 %10 + N /100000000

	if ( N % X = 0 )
		cout << "Yes" << endl;

	else
		cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:164: error: expected ';' before 'if'
   10 |         X = N %100000000 + N/10 %10000000 + N /100 %1000000 + N /1000 %100000 + N /10000 %10000 + N /100000 %1000 + N /100000 %100 + N /10000000 %10 + N /100000000
      |                                                                                                                                                                    ^
      |                                                                                                                                                                    ;
   11 | 
   12 |         if ( N % X = 0 )
      |         ~~                                                                                                                                                          
a.cc:15:9: error: 'else' without a previous 'if'
   15 |         else
      |         ^~~~
Language: C++

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

int main() {
	int N, X;

	cin,N;

	
	X = N %100000000 + N/10 %10000000 + N /100 %1000000 + N /1000 %100000 + N /10000 %10000 + N /100000 %1000 + N /100000 %100 + N /10000000 %10 + N /100000000

	if ( N % X = 0 )
		cout << "Yes" << endl;

	else
		cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:164: error: expected ';' before 'if'
   10 |         X = N %100000000 + N/10 %10000000 + N /100 %1000000 + N /1000 %100000 + N /10000 %10000 + N /100000 %1000 + N /100000 %100 + N /10000000 %10 + N /100000000
      |                                                                                                                                                                    ^
      |                                                                                                                                                                    ;
   11 | 
   12 |         if ( N % X = 0 )
      |         ~~                                                                                                                                                          
a.cc:15:9: error: 'else' without a previous 'if'
   15 |         else
      |         ^~~~
Language: C++

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

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

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

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

int main()
{
  int N, N_;
  int sum = 0;
  
  cin >> N;
  N_ = N;
  while (true)
  {
    if (N_ == 0)
    {
      break
    }
    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:15:12: error: expected ';' before '}' token
   15 |       break
      |            ^
      |            ;
   16 |     }
      |     ~
Language: C++

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

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

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

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

using namespace std;

int main() {

  int n, a = 0, b = 0;
  string buffier;
  cin >> buffier;
  for(int i = 0;i < n.size();i++){
    a = a * 10 + buffier[i] - '0';
    b += buffier[i] - '0';
  }
  if(a % b == 0){
    cout << "Yes";
  }else{
    cout << "No";
  }
}


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator>>'
    7 |   sin >> N;
      |   ~~~~^~~~
Language: C

#include <stdio.h>
 
void main()
{
    long long num, digit, sum = 0;
 
    
    scanf("%lld", &num);
    
    temp = num;
    while (num > 0)
    {
        digit = num % 10;
        sum  = sum + digit;
        num /= 10;
    }
    
    if(num%sum==0) printf("Yes");
    else printf("No");
    
}

Compiler output:
main.c: In function 'main':
main.c:10:5: error: 'temp' undeclared (first use in this function)
   10 |     temp = num;
      |     ^~~~
main.c:10:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main()
{
    int num,sum = 0;
    cin>>num;
    int n = num;
    while(num > 0)
    {
        int rem = num%10;
        sum = sum + rem;
        num = num/10;
    }

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

Compiler output:
a.cc:22:1: error: expected unqualified-id before numeric constant
   22 | 1
      | ^
Language: C++

#include<cstdio>
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

int main(void) {
	string N;
	cin >> N;
	int f;
	for (int i = 0; i < N.length(); i++) {
		f += N[i];
	}
	printf(X % f == 0 ? "Yes\n" : "No\n");
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: 'X' was not declared in this scope
   14 |         printf(X % f == 0 ? "Yes\n" : "No\n");
      |                ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected ',' or ';' before 'for'
    8 |     for (int i=N; i>=1; i/=10) {
      |     ^~~
a.cc:8:19: error: 'i' was not declared in this scope
    8 |     for (int i=N; i>=1; i/=10) {
      |                   ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected ',' or ';' before 'for'
    8 |     for (int i=N; i>0; i/=10) {
      |     ^~~
a.cc:8:19: error: 'i' was not declared in this scope
    8 |     for (int i=N; i>0; i/=10) {
      |                   ^
Language: C++

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

int main () {
  int t = N, c = 0;
  
  while (t > 0) {
    c += t % 10;
    t /= 10;
  }

  if (N % c == 0) { 
    cout << "yes" << endl;
  }
  
  else {
    cout << "no" << endl;
  }
  
}
  
  
  
  


Compiler output:
a.cc:2:17: error: 'atd' is not a namespace-name
    2 | using namespace atd;
      |                 ^~~
a.cc: In function 'int main()':
a.cc:5:11: error: 'N' was not declared in this scope
    5 |   int t = N, c = 0;
      |           ^
a.cc:8:5: error: 'c' was not declared in this scope
    8 |     c += t % 10;
      |     ^
a.cc:12:11: error: 'c' was not declared in this scope
   12 |   if (N % c == 0) {
      |           ^
a.cc:13:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |     cout << "yes" << endl;
      |     ^~~~
      |     std::cout
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:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:13:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   13 |     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:17:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |     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:17:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   17 |     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()
{
    long int n,val;
        sum+=(n%10);
    cin>>val;
    n=val;
    int sum=0;
    while(n!=0){
        n=n/10;
    }
   if(val%sum==0)
        cout<<"Yes";
    else cout<<"No";
  return 0;
}


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

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

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


Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main {
      |     ^~~~
a.cc:5:3: error: expected primary-expression before 'int'
    5 |   int N;
      |   ^~~
a.cc:5:3: error: expected '}' before 'int'
a.cc:4:10: note: to match this '{'
    4 | int main {
      |          ^
a.cc:6:3: error: 'cin' does not name a type
    6 |   cin>>N;
      |   ^~~
a.cc:8:3: error: expected unqualified-id before 'if'
    8 |   if(N/(N%10+(N%10))==0){
      |   ^~
a.cc:11:3: error: expected unqualified-id before 'else'
   11 |   else{
      |   ^~~~
a.cc:14:1: error: expected declaration before '}' token
   14 | }
      | ^
Language: C++

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

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

Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:5:3: error: expected primary-expression before 'int'
    5 |   int N;
      |   ^~~
a.cc:5:3: error: expected '}' before 'int'
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:6:3: error: 'cin' does not name a type
    6 |   cin>>N;
      |   ^~~
a.cc:8:3: error: expected unqualified-id before 'if'
    8 |   if(N/(N%10+(N%10))==0){
      |   ^~
a.cc:11:3: error: expected unqualified-id before 'else'
   11 |   else{
      |   ^~~~
a.cc:14:1: error: expected declaration before '}' token
   14 | }
      | ^
Language: C++

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

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

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

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

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

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

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

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

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'total' was not declared in this scope
   10 |   total=0;
      |   ^~~~~
a.cc:13:10: error: expected ';' before ':' token
   13 |     n/=10:
      |          ^
      |          ;
Language: C++

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

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


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

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

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


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

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

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


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

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

int main() {
  int N;
  int a,b,c,d;
  a = 1;
  c = 0;
  cin >> N;
    
   for (int i=0;i < 8;i++){
    a = a * 10;
    b = N % a;
    d = b;
    if (b > 10) {
      b = b - d;
    }
    c = c + b
    
    
     }
   cout << c << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:14: error: expected ';' before '}' token
   20 |     c = c + b
      |              ^
      |              ;
......
   23 |      }
      |      ~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:15:16: warning: division by zero [-Wdiv-by-zero]
   15 |   else if (N/a /=0){
      |            ~~~~^~~
a.cc:15:13: error: lvalue required as left operand of assignment
   15 |   else if (N/a /=0){
      |            ~^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  for (int i=0;i<a;i++){
    a +=(r-l+1);
  }
  cout >> a >>endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: 'a' was not declared in this scope
    7 |   for (int i=0;i<a;i++){
      |                  ^
a.cc:8:10: error: 'r' was not declared in this scope
    8 |     a +=(r-l+1);
      |          ^
a.cc:8:12: error: 'l' was not declared in this scope
    8 |     a +=(r-l+1);
      |            ^
a.cc:10:11: error: 'a' was not declared in this scope
   10 |   cout >> a >>endl;
      |           ^
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:8:9: error: lvalue required as left operand of assignment
    8 |     a%10=b;
      |         ^
main.c:9:9: error: lvalue required as left operand of assignment
    9 |     a/10=a;
      |         ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:8:9: error: lvalue required as left operand of assignment
    8 |     a%10=b;
      |         ^
main.c:9:9: error: lvalue required as left operand of assignment
    9 |     a/10=a;
      |         ^
main.c:16:17: error: expected ';' before '}' token
   16 |     printf("No")
      |                 ^
      |                 ;
   17 |   }
      |   ~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:8:9: error: lvalue required as left operand of assignment
    8 |     a%10=b;
      |         ^
main.c:9:9: error: lvalue required as left operand of assignment
    9 |     a/10=a;
      |         ^
main.c:13:19: error: 'Yes' undeclared (first use in this function)
   13 |     printf("%d\n",Yes);
      |                   ^~~
main.c:13:19: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:19: error: 'No' undeclared (first use in this function)
   16 |     printf("%d\n",No)
      |                   ^~
main.c:16:22: error: expected ';' before '}' token
   16 |     printf("%d\n",No)
      |                      ^
      |                      ;
   17 |   }
      |   ~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:8:9: error: lvalue required as left operand of assignment
    8 |     a%10=b;
      |         ^
main.c:9:13: error: lvalue required as left operand of assignment
    9 |     (a-b)/10=a;
      |             ^
main.c:12:14: error: lvalue required as left operand of assignment
   12 |   if(a%answer=0){
      |              ^
main.c:13:19: error: 'Yes' undeclared (first use in this function)
   13 |     printf("%d\n",Yes);
      |                   ^~~
main.c:13:19: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:19: error: 'No' undeclared (first use in this function)
   16 |     printf("%d\n",No)
      |                   ^~
main.c:16:22: error: expected ';' before '}' token
   16 |     printf("%d\n",No)
      |                      ^
      |                      ;
   17 |   }
      |   ~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:17:10: error: expected ';' before 'if'
   17 |   A = N/S
      |          ^
      |          ;
   18 | if(A*S==N){
      | ~~        
a.cc:21:3: error: 'else' without a previous 'if'
   21 |   else{
      |   ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:17:10: error: expected ';' before 'if'
   17 |   A = N/S
      |          ^
      |          ;
   18 | if(A*S==N){
      | ~~        
a.cc:21:3: error: 'else' without a previous 'if'
   21 |   else{
      |   ^~~~
Language: C++

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: expected primary-expression before '>' token
   10 | for(int i=8; i => 0; i--){
      |                 ^
Language: C++

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

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

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

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

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

int main() {
 int a,b,c,d,e,N;
 cin >> N;
  b = 0;
 for (100000000){
   int x=1;
   x*=10;
   c = N % x - b;
   b = N % x;
   d+=c;
     
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: expected ';' before ')' token
    8 |  for (100000000){
      |                ^
      |                ;
a.cc:15:2: error: expected primary-expression at end of input
   15 | }
      |  ^
a.cc:15:2: error: expected ';' at end of input
   15 | }
      |  ^
      |  ;
a.cc:15:2: error: expected primary-expression at end of input
a.cc:15:2: error: expected ')' at end of input
   15 | }
      |  ^
      |  )
a.cc:8:6: note: to match this '('
    8 |  for (100000000){
      |      ^
a.cc:15:2: error: expected statement at end of input
   15 | }
      |  ^
a.cc:15:2: error: expected '}' at end of input
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() {
 int a,b,c,d,e,N;
 cin >> N;
  b = 0
 for (100000000){
   int x=1;
   x*=10
   c = N % x - b
   b = N % x
   d+=c  
     
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: expected ';' before 'for'
    7 |   b = 0
      |        ^
      |        ;
    8 |  for (100000000){
      |  ~~~    
a.cc:15:2: error: expected '}' at end of input
   15 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

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

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

}

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

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

int N;
  
int main() {
  cin >> N;
  int t = N;
  int c=0;

  while(t>0)
    c += t % 10, t /= 10;
    if(N % c == 0)
    cout << "Yes" << endl;
      return 0;
   else
    cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:4: error: 'else' without a previous 'if'
   16 |    else
      |    ^~~~
Language: C++

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

int N;
  cin >> N;
  int t = N;
  int c=0;

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


Compiler output:
a.cc:5:3: error: 'cin' does not name a type
    5 |   cin >> N;
      |   ^~~
Language: C++

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


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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |     ans += N%10, c= c/10;
      |     ^~~
      |     abs
a.cc: At global scope:
a.cc:16:1: error: expected declaration before '}' token
   16 | }
      | ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:26: error: expected ';' before ':' token
   13 |     cout << "Yes" << endl:
      |                          ^
      |                          ;
Language: C++

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


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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:13:26: error: expected ';' before ':' token
   13 |     cout << "Yes" << endl:
      |                          ^
      |                          ;
a.cc:19:4: error: expected '}' at end of input
   19 |   }
      |    ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:13:26: error: expected ';' before ':' token
   13 |     cout << "Yes" << endl:
      |                          ^
      |                          ;
Language: C++

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

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


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

#include <iostream>
using namespace std;

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

int main() {
  int N;
  std::cin >>N;
  int sum=FindSomeOfDigits(N)
  if(N%sum==0){std::cout << "Yes" << '\n';}
  else {std::cout << "No" << '\n';}

}


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

#include <iostream>
using namespace std;

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

int main() {
  int N;
  std::cin >>N;
  int sum=FindSomeOfDigits(N)
  if(N%sum==0)std::cout << "Yes" << '\n';
  else std::cout << "No" << '\n';

}


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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: expected ';' before 'for'
   10 |   M == N
      |         ^
      |         ;
   11 | 
   12 |   for (int i = 0; i < 9; i++) {
      |   ~~~    
a.cc:12:19: error: 'i' was not declared in this scope
   12 |   for (int i = 0; i < 9; i++) {
      |                   ^
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, X;
  
  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 + I;
    
    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:9:20: error: expected ';' before 'B'
    9 |   A = N / 100000000
      |                    ^
      |                    ;
   10 |   B = N % 10000000 - N % 100000000 * 10;
      |   ~
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 % 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 + I;
    
    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:19:3: error: 'X' was not declared in this scope
   19 |   X = A + B + C + D + E + F + G + H + I;
      |   ^