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

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

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

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

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

int main(){
  int N,A,B,C;
  int count = 0;　
  int a = 0; 
  int b = 0;
  int c = 0;
  cin >> N; 
  A = N;
  B = N;
  for(int i = 0;  ;i++){
  N / 10;
  count++;
  N = N;
    if(N > 10){
      break;
    }
  }
  for(int j = 0;j < count;j++){
  for(int i = 0;i + c < count;i++){
    A = A / 10;
    }
  for(int i = 0;i + c < count;i++){
    A = A * 10;
    }
    C = B - A;
  for(;;){
      C = C / 10;
      if(C < 10){
      break;
      }
    c++;
    A = B;
    b += C;
  }
    b += N;
  if(A % b == 0){
    cout << "Yes" <<endl;
  }
    else {
      cout << "No" <<endl;
    }
  }
} 

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

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

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

Compiler output:
a.cc:6:17: error: extended character 　 is not valid in an identifier
    6 |   int count = 0;　
      |                 ^
a.cc: In function 'int main()':
a.cc:6:17: error: '\U00003000' was not declared in this scope
    6 |   int count = 0;　
      |                 ^~
a.cc:29:8: error: expected ';' before ')' token
   29 |   for(1){
      |        ^
      |        ;
a.cc:39:3: error: expected primary-expression before 'if'
   39 |   if(A % b == 0){
      |   ^~
a.cc:38:12: error: expected ')' before 'if'
   38 |     b += N;
      |            ^
      |            )
   39 |   if(A % b == 0){
      |   ~~        
a.cc:29:6: note: to match this '('
   29 |   for(1){
      |      ^
Language: C++

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

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

Compiler output:
a.cc:6:17: error: extended character 　 is not valid in an identifier
    6 |   int count = 0;　
      |                 ^
a.cc: In function 'int main()':
a.cc:6:17: error: '\U00003000' was not declared in this scope
    6 |   int count = 0;　
      |                 ^~
a.cc:29:8: error: expected ';' before ')' token
   29 |   for(1){
      |        ^
      |        ;
a.cc:39:3: error: expected primary-expression before 'if'
   39 |   if(A % b == 0){
      |   ^~
a.cc:38:12: error: expected ')' before 'if'
   38 |     b += N;
      |            ^
      |            )
   39 |   if(A % b == 0){
      |   ~~        
a.cc:29:6: note: to match this '('
   29 |   for(1){
      |      ^
a.cc:45:4: error: expected '}' at end of input
   45 |   }
      |    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

int main(){
  int N,A,B,C;
  int count = 0;　//Nを10で割る回数
  int a = 0; 
  int b = 0; //各桁の数の総和
  int c = 0;
  cin >> N; 
  A = N;
  B = N; //Nと同じ数を用意
  for(int i = 0;  ;i++){ //Nを10で割って一桁になるまでの回数を数える
  N / 10;
  count++;
  N = N;　//Nに現在のNを代入
    if(N > 10){　//一桁になったときにループをぬける
      break;
    }
  }
  for(int j = 0;j < count;j++){　//
  for(int i = 0;i + c < count;i++){ //Nを割った回数分Aを割る
    A = A / 10;
    }
  for(int i = 0;i + c < count;i++){
    A = A * 10;
    }
    C = B - A;
  for(1){
      C = C / 10;
      if(C < 10){
      break;
      }
    c++;
    A = B;
    b += C;　//bにCを代入
  }
    b += N;
  if(A % b == 0){ //割り切ればYes、でなければNo
    cout << "Yes" <<endl;
  }
    else {
      cout << "No" <<endl;
    }
  }
    
    

Compiler output:
a.cc:6:17: error: extended character 　 is not valid in an identifier
    6 |   int count = 0;　//Nを10で割る回数
      |                 ^
a.cc:16:9: error: extended character 　 is not valid in an identifier
   16 |   N = N;　//Nに現在のNを代入
      |         ^
a.cc:17:16: error: extended character 　 is not valid in an identifier
   17 |     if(N > 10){　//一桁になったときにループをぬける
      |                ^
a.cc:21:32: error: extended character 　 is not valid in an identifier
   21 |   for(int j = 0;j < count;j++){　//
      |                                ^
a.cc:36:12: error: extended character 　 is not valid in an identifier
   36 |     b += C;　//bにCを代入
      |            ^
a.cc: In function 'int main()':
a.cc:6:17: error: '\U00003000' was not declared in this scope
    6 |   int count = 0;　//Nを10で割る回数
      |                 ^~
a.cc:16:11: error: expected ';' before 'if'
   16 |   N = N;　//Nに現在のNを代入
      |           ^
      |           ;
   17 |     if(N > 10){　//一桁になったときにループをぬける
      |     ~~     
a.cc:21:34: error: expected ';' before 'for'
   21 |   for(int j = 0;j < count;j++){　//
      |                                  ^
      |                                  ;
   22 |   for(int i = 0;i + c < count;i++){ //Nを割った回数分Aを割る
      |   ~~~                             
a.cc:22:17: error: 'i' was not declared in this scope
   22 |   for(int i = 0;i + c < count;i++){ //Nを割った回数分Aを割る
      |                 ^
a.cc:29:8: error: expected ';' before ')' token
   29 |   for(1){
      |        ^
      |        ;
a.cc:39:3: error: expected primary-expression before 'if'
   39 |   if(A % b == 0){ //割り切ればYes、でなければNo
      |   ^~
a.cc:38:12: error: expected ')' before 'if'
   38 |     b += N;
      |            ^
      |            )
   39 |   if(A % b == 0){ //割り切ればYes、でなければNo
      |   ~~        
a.cc:29:6: note: to match this '('
   29 |   for(1){
      |      ^
a.cc:45:4: error: expected '}' at end of input
   45 |   }
      |    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

int main(){
  int N,A,B,C;
  int count = 0;　//Nを10で割る回数
  int a = 0; 
  int b = 0; //各桁の数の総和
  int c = 0;
  cin >> N; 
  A = N;
  B = N; //Nと同じ数を用意
  for(int i = 0;  ;i++){ //Nを10で割って一桁になるまでの回数を数える
  N / 10;
  count++;
  N = N;　//Nに現在のNを代入
    if(N > 10){　//一桁になったときにループをぬける
      break;}
  }
  for(int j = 0;j < count;j++){　//
  for(int i = 0;i + c < count;i++){ //Nを割った回数分Aを割る
    A = A / 10;
    }
  for(int i = 0;i + c < count;i++){
    A = A * 10;
    }
    C = B - A;
  for(1){
      C = C / 10;
      if(C < 10){
      break;
      }
    c++;
    A = B;
    b += C;　//bにCを代入
  }
    b += N;
  if(A % b == 0){ //割り切ればYes、でなければNo
    cout << "Yes" <<endl;
  }
    else {
      cout << "No" <<endl;
    }
  }
    
    

Compiler output:
a.cc:6:17: error: extended character 　 is not valid in an identifier
    6 |   int count = 0;　//Nを10で割る回数
      |                 ^
a.cc:16:9: error: extended character 　 is not valid in an identifier
   16 |   N = N;　//Nに現在のNを代入
      |         ^
a.cc:17:16: error: extended character 　 is not valid in an identifier
   17 |     if(N > 10){　//一桁になったときにループをぬける
      |                ^
a.cc:20:32: error: extended character 　 is not valid in an identifier
   20 |   for(int j = 0;j < count;j++){　//
      |                                ^
a.cc:35:12: error: extended character 　 is not valid in an identifier
   35 |     b += C;　//bにCを代入
      |            ^
a.cc: In function 'int main()':
a.cc:6:17: error: '\U00003000' was not declared in this scope
    6 |   int count = 0;　//Nを10で割る回数
      |                 ^~
a.cc:16:11: error: expected ';' before 'if'
   16 |   N = N;　//Nに現在のNを代入
      |           ^
      |           ;
   17 |     if(N > 10){　//一桁になったときにループをぬける
      |     ~~     
a.cc:20:34: error: expected ';' before 'for'
   20 |   for(int j = 0;j < count;j++){　//
      |                                  ^
      |                                  ;
   21 |   for(int i = 0;i + c < count;i++){ //Nを割った回数分Aを割る
      |   ~~~                             
a.cc:21:17: error: 'i' was not declared in this scope
   21 |   for(int i = 0;i + c < count;i++){ //Nを割った回数分Aを割る
      |                 ^
a.cc:28:8: error: expected ';' before ')' token
   28 |   for(1){
      |        ^
      |        ;
a.cc:38:3: error: expected primary-expression before 'if'
   38 |   if(A % b == 0){ //割り切ればYes、でなければNo
      |   ^~
a.cc:37:12: error: expected ')' before 'if'
   37 |     b += N;
      |            ^
      |            )
   38 |   if(A % b == 0){ //割り切ればYes、でなければNo
      |   ~~        
a.cc:28:6: note: to match this '('
   28 |   for(1){
      |      ^
a.cc:44:4: error: expected '}' at end of input
   44 |   }
      |    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

int main() {

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: expected ';' before '}' token
   10 |    x += N%(10*i)/i
      |                   ^
      |                   ;
   11 |   }
      |   ~
Language: C++

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


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

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

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

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

	int fn = 0;
	
	while (N > 0) {
		fn += N % 10;
		N /= 10;
	}

	cout << ((N % fn) == 0 ? "Yes" : "No") << endl;
	return 0;

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

#include <iostream>
#include <string>
#include <math.h>
#include <algorithm>//ソートなどに必要
using namespace std;

int main() 
{
    long n;
    cin >> n;
    long a = findSumOfDigits(n);

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

long findSumOfDigits(long n) 
{//引数をnとして、nの各桁の数の和を求める
  long sum = 0;
  while (n > 0) 
  { // n が 0 になるまで
    sum += n % 10;//一の位から順に数をたす
    n /= 10;//10なら次は１、9なら終了になる
  }
  return sum;
}

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

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

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

　// ここにプログラムを追記
  int s = 0;
  for ( int i = 0; i < log10(N); i++ ) s += N % pow( 10, i+1 ) / pow( 10, i );
  if ( N % s == 0 ) cout << "Yes" << endl;
  else cout << "No" << endl;
}


Compiler output:
a.cc:8:1: error: extended character 　 is not valid in an identifier
    8 | 　// ここにプログラムを追記
      | ^
a.cc: In function 'int main()':
a.cc:8:1: error: '\U00003000' was not declared in this scope
    8 | 　// ここにプログラムを追記
      | ^~
a.cc:10:40: error: 's' was not declared in this scope
   10 |   for ( int i = 0; i < log10(N); i++ ) s += N % pow( 10, i+1 ) / pow( 10, i );
      |                                        ^
a.cc:10:47: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   10 |   for ( int i = 0; i < log10(N); i++ ) s += N % pow( 10, i+1 ) / pow( 10, i );
      |                                             ~ ^ ~~~~~~~~~~~~~~
      |                                             |      |
      |                                             int    __gnu_cxx::__promote<double>::__type {aka double}
a.cc:11:12: error: 's' was not declared in this scope
   11 |   if ( N % s == 0 ) cout << "Yes" << endl;
      |            ^
Language: C++

#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <algorithm>
#include <functional>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <stdio.h>
using namespace std;

#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
typedef long long ll;

// 各桁の和を計算する関数
int findSumOfDigits(int n) {
	if (n < 10)return n;
	return func(n / 10) + n % 10;
}

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	int N;
	cin >> N;
	cout << (N%findSumOfDigits(N)==0?"Yes":"No") << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int findSumOfDigits(int)':
a.cc:18:16: error: 'func' was not declared in this scope
   18 |         return func(n / 10) + n % 10;
      |                ^~~~
Language: C++

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

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

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

#include<iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   10 |     S += (N % 10);
      |           ~ ^ ~~
      |           |   |
      |           |   int
      |           double
Language: C++

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

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

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

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

#define FOR(i,l,r) for(int i = int(l);i < int(r);i++)
template<typename T> bool chmax(T& a,const T& b){ return a < b ? (a = b,true) : false; }
template<typename T> bool chmin(T& a,const T& b){ return b < a ? (a = b,true) : false; }
typedef long long ll;



int main()
{    
    int N;
	//scanf("%d",&N);
    cin >> N;
    int f=0;
    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:22:31: error: expected '}' at end of input
   22 |     else cout << "No" << endl;
      |                               ^
a.cc:12:1: note: to match this '{'
   12 | {
      | ^
Language: C++

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

#define FOR(i,l,r) for(int i = int(l);i < int(r);i++)
template<typename T> bool chmax(T& a,const T& b){ return a < b ? (a = b,true) : false; }
template<typename T> bool chmin(T& a,const T& b){ return b < a ? (a = b,true) : false; }
typedef long long ll;

int N;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:21:31: error: expected '}' at end of input
   21 |     else cout << "No" << endl;
      |                               ^
a.cc:12:1: note: to match this '{'
   12 | {
      | ^
Language: C++

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

#define FOR(i,l,r) for(int i = int(l);i < int(r);i++)
template<typename T> bool chmax(T& a,const T& b){ return a < b ? (a = b,true) : false; }
template<typename T> bool chmin(T& a,const T& b){ return b < a ? (a = b,true) : false; }
typedef long long ll;

int N;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:20:31: error: expected '}' at end of input
   20 |     else cout << "No" << endl;
      |                               ^
a.cc:12:1: note: to match this '{'
   12 | {
      | ^
Language: C++

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

int main() {
  int N, sum;
  cin >> N;
  sum = 0;
  
  for (;N > 0;) {
    x = N % 10;
    sum += x;
    N /= 10 ;
  }
}

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

#include<iostream>
#include<algorithm>
#include<string>
#include<cmath>
using namespace std;

int main() {
  long long n,a; cin >> n; a=n;
  int sum=0;
  int lenN = to_string(n).length();
  for(int i=lenN; i>0; --i) {
    sum += a / pow(10, i-1);
    a = a % pow(10, i-1);
  }
  if( n % sum == 0 ) cout << "Yes" << endl;
  else cout << "No" << endl;
  
  return 0;
}


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

#include<iostream>
#include<algorithm>
#include<string>
#include<cmath>
using namespace std;

int main() {
  long long n,a; cin >> n; a=n;
  int sum=0;
  int lenN = to_string(n).length();
  for(int i=lenN; i>0; --i) {
    sum += a / pow(10, i-1)
    a = a % pow(10, i-1);
  }
  if( n % sum == 0 ) cout << "Yes" << endl;
  else cout << "No" << endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:28: error: expected ';' before 'a'
   12 |     sum += a / pow(10, i-1)
      |                            ^
      |                            ;
   13 |     a = a % pow(10, i-1);
      |     ~
Language: C++

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

int main() {
  long long n,a; cin >> n; a=n;
  int sum=0;
  int lenN = to_string(n).length();
  for(int i=lenN; i>0; --i) {
    sum += a / pow(10, i-1)
    a = a % pow(10, i-1);
  }
  if( n % sum == 0 ) cout << "Yes" << endl;
  else cout << "No" << endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: 'pow' was not declared in this scope
   11 |     sum += a / pow(10, i-1)
      |                ^~~
Language: C++

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

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

  for (int i = 0; i < 9; i++) {
    int A = 0;
    A = A + N%(10^(i+1))/10^(i);
  }
  if (N % A == 0) {
    cout << "Yes" << endl;
  }
    else {
      cout << "No" << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: 'A' was not declared in this scope
   12 |   if (N % A == 0) {
      |           ^
Language: C++

#include<cstdio>
using namespace std;
int main(){
  int n; cin >> n;
  int m = 0;
  while(n > 0){
    m += n % 10;
    n /= 10;
  }
  if(n % m == 0) cout << "Yes" << endl;
  else cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:10: error: 'cin' was not declared in this scope
    4 |   int n; cin >> n;
      |          ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<cstdio>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:10:18: error: 'cout' was not declared in this scope
   10 |   if(n % m == 0) cout << "Yes" << endl;
      |                  ^~~~
a.cc:10:18: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:35: error: 'endl' was not declared in this scope
   10 |   if(n % m == 0) cout << "Yes" << endl;
      |                                   ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include<cstdio>
  +++ |+#include <ostream>
    2 | using namespace std;
a.cc:11:8: error: 'cout' was not declared in this scope
   11 |   else cout << "No" << endl;
      |        ^~~~
a.cc:11:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:24: error: 'endl' was not declared in this scope
   11 |   else cout << "No" << endl;
      |                        ^~~~
a.cc:11:24: 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 n; cin >> n;
  int m = 0;
  while(int n > 0) m += n % 10; n /= 10;
  if(n %= m) cout << "Yes" << endl;
  else cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: expected initializer before '>' token
    6 |   while(int n > 0) m += n % 10; n /= 10;
      |               ^
a.cc:6:14: error: expected ')' before '>' token
    6 |   while(int n > 0) m += n % 10; n /= 10;
      |        ~     ^~
      |              )
a.cc:6:15: error: expected primary-expression before '>' token
    6 |   while(int n > 0) m += n % 10; n /= 10;
      |               ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: expected initializer before '>' token
    6 |   while(int n > 0) m += n % 10, n /= 10;
      |               ^
a.cc:6:14: error: expected ')' before '>' token
    6 |   while(int n > 0) m += n % 10, n /= 10;
      |        ~     ^~
      |              )
a.cc:6:15: error: expected primary-expression before '>' token
    6 |   while(int n > 0) m += n % 10, n /= 10;
      |               ^
Language: C++

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

  int f(int m){
    int l = 0;
    while(m > 0){
      l += m % 10;
      m /= 10;
      return l;
    } 
    f(m) = l;
  }
  
  int n; cin >> n;
  if( f(n) % n == 0) cout << "Yes" << endl;
  else cout << "No" << endl;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: a function-definition is not allowed here before '{' token
    6 |   int f(int m){
      |               ^
a.cc:17:7: error: 'f' was not declared in this scope
   17 |   if( f(n) % n == 0) cout << "Yes" << endl;
      |       ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: expected ',' or ';' before '{' token
    7 |   int f(m){
      |           ^
a.cc:16:8: error: 'f' cannot be used as a function
   16 |   if( f(n) % n == 0) cout << "Yes" << endl;
      |       ~^~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:8: error: 'f' cannot be used as a function
   15 |   if( f(n) % n == 0) cout << "Yes" << endl;
      |       ~^~~
Language: C++

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

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


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

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

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

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

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

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

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

#include <iostream>
#include <math.h>
using namespace std;

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

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

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: error: 'pow' is not a member of 'std'
    8 |     sum += n / std::pow(10,i);
      |                     ^~~
a.cc:9:19: error: 'pow' is not a member of 'std'
    9 |     n -= n / std::pow(10,i) * std::pow(10,i);
      |                   ^~~
a.cc:9:36: error: 'pow' is not a member of 'std'
    9 |     n -= n / std::pow(10,i) * std::pow(10,i);
      |                                    ^~~
Language: C++

#include <iostream>
using namespace std;

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

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

#include <iostream>
using namespace std;

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

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

#include <iostream>
#include <algorithm>
#include <cctype>

int main()
{
    std::string s;
    std::cin >> s;
    int n{std::stoi(s)};
    int digits_sum{std::accumulate(s.begin(), s.end(), 0, [](int sum, char c) { return sum += (std::isdigit(c) ? (c - '0') : 0); })};
    std::cout << ((n % digits_sum) ? "No" : "Yes") << std::endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:25: error: 'accumulate' is not a member of 'std'
   10 |     int digits_sum{std::accumulate(s.begin(), s.end(), 0, [](int sum, char c) { return sum += (std::isdigit(c) ? (c - '0') : 0); })};
      |                         ^~~~~~~~~~
Language: C++

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

int main() {
    int N,M,count=0;
    cin>>N;M=N;
    int sum=0;
    while(N!=0){N/=10;count++;}
    N=M;
    int sum = 0;
    for (int i=0;i<count;i++){
        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:10:9: error: redeclaration of 'int sum'
   10 |     int sum = 0;
      |         ^~~
a.cc:7:9: note: 'int sum' previously declared here
    7 |     int sum=0;
      |         ^~~
Language: C++

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

int main() {
  // 各位の数字を足す関数
  int findSumOfDigits(int n){
    int sum=0;
    while(n>0){
      sum = sum + n%10;
      n=n/10;
    }
    return sum;
  }
  
  int N;
  cin>>N;
  
  int wa=findSumOfDigits(N);
  if(N%wa==0)
    cout<<"yes"<<endl;
  else
    cout<<"no"<<endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:7:29: error: a function-definition is not allowed here before '{' token
    7 |   int findSumOfDigits(int n){
      |                             ^
a.cc:19:10: error: 'findSumOfDigits' was not declared in this scope
   19 |   int wa=findSumOfDigits(N);
      |          ^~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int findSumOfDigits(int n)
{
  int sum = 0;
  while (n > 0)
  { // n が 0 になるまで
    sum += n % 10;
    n /= 10;
  }
  return sum;
}
main()
{
  int N;
  cin>>N;
  int sum = findSumOfDigits(N);
  if(N$sum==0)
    cout << "Yes" << endl;
    else
      cout << "No" << endl;
}


Compiler output:
a.cc:13:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   13 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:18:6: error: 'N$sum' was not declared in this scope; did you mean 'sum'?
   18 |   if(N$sum==0)
      |      ^~~~~
      |      sum
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: no match for 'operator%' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   11 |     if(n%ans==0){
      |        ~^~~~
      |        | |
      |        | basic_string<[...]>
      |        basic_string<[...]>
Language: C++

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;

#define INF 1<<30
#define LINF 1ll<<60ll
#define MOD 1000000007
#define pb(a) push_back(a)

#define _overload3(_1,_2,_3,_4,name,...) name
#define _rep(i,n) _repi(i,0,n)
#define _repi(i,a,b) for(int i=a, i##_len=(b); i<i##_len; ++i)
#define _repis(i,a,b,s) for(int i=a, i##_len(b); i<i##_len; i+=s)
#define REP(...) _overload3(__VA_ARGS__,_repis,_repi,_rep,)(__VA_ARGS__)

#define REPR(i, n) for(int i = n;i >= 0;--i)
#define REPARR(i, v) for(int i = 0;i < sz(v);++i)

#define all(vec) (vec.begin()),(vec.end())
#define sz(x) ((int)(x).size())
#define bit(n) (1ll<<(n))

template<class T>bool chmax(T &a,const T &b){if(a<b){a=b;return true;}return false;}
template<class T>bool chmin(T &a,const T &b){if(a>b){a=b;return true;}return false;}

#define YES(n) cout<<((n)?"YES":"NO")<<endl
#define Yes(n) cout<<((n)?"Yes":"No")<<endl
#define yes(n) cout<<((n)?"yes":"no")<<endl
#define poss(n) cout<<((n)?"possible":"impossible")<<endl
#define Poss(n) cout<<((n)?"Possible":"Impossible")<<endl
#define POSS(n) cout<<((n)?"POSSIBLE":"IMPOSSIBLE")<<endl



int main(){
    int n;
    ci>>n;
    int w=0;
    int N=n;
    while(N){
        w+=N%10;
        N/=10;
    }
    Yes(!(n%w));
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:45:5: error: 'ci' was not declared in this scope; did you mean 'vi'?
   45 |     ci>>n;
      |     ^~
      |     vi
Language: C++

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


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

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

int main(){
    string S;
    cin>>S;
    int f=0,x=stoi(S);
    for(int i=0;i<S.size();++i) f+=S[i]-'0';
    puts(!(x%f)?"Yes":"No");
}

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:5:5: error: 'string' was not declared in this scope
    5 |     string S;
      |     ^~~~~~
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin>>S;
      |     ^~~
a.cc:6:10: error: 'S' was not declared in this scope
    6 |     cin>>S;
      |          ^
a.cc:7:15: error: 'stoi' was not declared in this scope
    7 |     int f=0,x=stoi(S);
      |               ^~~~
a.cc:9:5: error: 'puts' was not declared in this scope
    9 |     puts(!(x%f)?"Yes":"No");
      |     ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: 'sumofdigits' was not declared in this scope; did you mean 'findSumOfDigits'?
   14 |     int s = sumofdigits(n);
      |             ^~~~~~~~~~~
      |             findSumOfDigits
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long 
#define GIO ios_base::sync_with_stdio(0);cin.tie(0);

int main()
{ GIO;
    ll T;
    cin>>T;
 ll sum=0;
    while(T>0)
    {    ll z=T%10;
    	sum+=z;
         z=z/10;
     }
 if(T%z==0) cout<<"Yes"<<"\n";
 else cout<<"NO"<<"\n";

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:7: error: 'z' was not declared in this scope
   16 |  if(T%z==0) cout<<"Yes"<<"\n";
      |       ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: 'N' was not declared in this scope
    6 |     int t = N, c = 0;
      |             ^
a.cc:7:19: error: 'c' was not declared in this scope
    7 |     while (t > 0) c += t % 10, t /= 10;
      |                   ^
a.cc:8:13: error: 'c' was not declared in this scope
    8 |     if (n % c ==0) puts("Yes");
      |             ^
Language: C++

#include <bits/stdc++.h>


#include <string.h>
using namespace std;
int main(void){
	long a=0,b,c,i,d,f,g;
	string A="",B,C;
	cin>>A;
	for(i=0;i<A.size();i++){
		a+=A[i];
	}
	if((int)A%a==0){
		cout<<"Yes"<<endl;
	}else{
	cout<<"No"<<endl;
	}
	return 0;
}

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

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

#include <string.h>
using namespace std;
int main(void){
	long a=0,b,c,i,d,f,g;
	string A,B,C;
	cin>>A;
	for(i=0;i<A.size();i++){
		a+=A[i];
	}
	if((int)A%a==0){
		cout<<"Yes"<<endl;
	}else{
	cout<<"No"<<endl;
	}
	return 0;
}

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

#include <bits/stdc++.h>
#include <string.h>
using namespace std;
int main(void){
	long a=0,b,c,i,d,f,g;
	string A,B,C;
	cin>>A;
	for(i=0;i<A.size();i++){
		a+=A[i];
	}
	if((int)A%a==0){
		cout<<"Yes"<<endl;
	}else{
	cout<<"No"<<endl;
	}
	return 0;
}

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

#include <bits/stdc++.h>
#include <string>
using namespace std;
int main(void){
	long a=0,b,c,i,d,f,g;
	string A,B,C;
	cin>>A;
	for(i=0;i<A.size();i++){
		a+=A[i];
	}
	if((int)A%a==0){
		cout<<"Yes"<<endl;
	}else{
	cout<<"No"<<endl;
	}
	return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
int main(void){
	long a=0,b,c,i,d,f,g;
	string A,B,C;
	cin>>A;
	for(i=0;i<A.size();i++){
		a+=A[i];
	}
	if((int)A%a==0){
		cout<<"Yes"<<endl;
	}else{
	cout<<"No"<<endl;
	}
	return 0;
}

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

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

int main(){
  int a,b=0,c,d,e,g,f,h,i,j,k,array[100001];
  string s,array2[100001];
  cin>>a;
  c=a;
  while(c){
    b+=c%10;
    c/=10;
  }
  if(a%b){
    cout<<"No";
  }else{
    cout<<"Yes;
  }
  cout<<endl;
}
    

Compiler output:
a.cc:16:11: warning: missing terminating " character
   16 |     cout<<"Yes;
      |           ^
a.cc:16:11: error: missing terminating " character
   16 |     cout<<"Yes;
      |           ^~~~~
a.cc: In function 'int main()':
a.cc:17:3: error: expected primary-expression before '}' token
   17 |   }
      |   ^
Language: C++

#include<queue>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
int a,c;
int main()
{
	cin>>a;
	int b=a;
	while (b)
	{
		c+=b%10;
		b/=10;
	}
	if (a%c==0) printf("Yes")
	    else printf("No");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:34: error: expected ';' before 'else'
   17 |         if (a%c==0) printf("Yes")
      |                                  ^
      |                                  ;
   18 |             else printf("No");
      |             ~~~~
Language: C++

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

int main(){ //11-b-Harshad_Namber
  string a;
  int f,n,x,y;
  n=0;
  f=0;
  x=1;
  y=0;
  cin >> a;
  for(int i=1;i<a.size();i++){
    x*=10;
  }  
  //cout<<x<<endl;
  for(int i=0;i<a.size();i++){
    
    if(a.at(i) =='1'){
      y=1;
    }
    else if(a.at(i) =='2'){
      y=2;
    }
    else if(a.at(i) =='3'){
      y=3;
    }
    else if(a.at(i) =='4'){
      y=4;
    }
    else if(a.at(i) =='5'){
      y=5;
    }
    else if(a.at(i) =='6'){
      y=6;
    }
    else if(a.at(i) =='7'){
      y=7;
    }
    else if(a.at(i) =='8'){
      y=8;
    }
    else if(a.at(i) =='9'){
      y=9;
    }
    else {
    }
    n+=y*x;
    f+=y;
    x/=10;
    //cout<<a.at(i)<<","<<n<<","<<f<<","<<endl;
  }
  if(n==0){
    cout <<"Yes"<<endl;
  else if(n%f == 0){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
}

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

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

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

  for (int i = 0; i < N.size(); i++){
    f_N = N.at(i); //i文字目の取得(str)
    int f_n = atoi(f_N.c_str());  //translation from str to int
    sum += f_n;
  }

  int X = atoi(N.c_str()); //Nを数値に置き換え
  if (X / sum == 0){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'f_N' was not declared in this scope
   10 |     f_N = N.at(i); //i文字目の取得(str)
      |     ^~~
a.cc:21:4: 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 f_N = 0;
  string N;
  cin >> N;
  a = N.size(); //桁数を文字数として取得
  int n = atoi(N.c_str()); //文字列を数値に変換

  for (int i = 0; i < a + 1; i++){
    f_N += n /10; //各位の数字を取得して加算
    n = (n - n / 10) / 10; //nの更新
  }

  if (n / f_N == 0){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'a' was not declared in this scope
    8 |   a = N.size(); //桁数を文字数として取得
      |   ^
Language: C++

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

int main() {
  int N, f_N = 0, i, a;
  cin >> N;

  //.size()で桁数取得&10で割って各位の数字を取得

  for (i = N.size() - 1; i >= 0; i--){
    f_N += N / pow(10, N.size() - 1);  //最上位の数字取得
    a = N / pow(10, N.size() - 1);
    N -=  a * pow(10, N.size() - 1); // N更新

  }

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

}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: request for member 'size' in 'N', which is of non-class type 'int'
   11 |   for (i = N.size() - 1; i >= 0; i--){
      |              ^~~~
a.cc:12:26: error: request for member 'size' in 'N', which is of non-class type 'int'
   12 |     f_N += N / pow(10, N.size() - 1);  //最上位の数字取得
      |                          ^~~~
a.cc:13:23: error: request for member 'size' in 'N', which is of non-class type 'int'
   13 |     a = N / pow(10, N.size() - 1);
      |                       ^~~~
a.cc:14:25: error: request for member 'size' in 'N', which is of non-class type 'int'
   14 |     N -=  a * pow(10, N.size() - 1); // N更新
      |                         ^~~~
Language: C++

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

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

  //.size()で桁数取得&10で割って各位の数字を取得

  for (i = N.size() - 1; i >= 0; i--){
    f_N += N / pow(10, N.size() - 1);  //最上位の数字取得
    a = N / pow(10, N.size() - 1);
    N -=  a * pow(10, N.size() - 1); // N更新

  }

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



}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: 'i' was not declared in this scope
   11 |   for (i = N.size() - 1; i >= 0; i--){
      |        ^
a.cc:11:14: error: request for member 'size' in 'N', which is of non-class type 'int'
   11 |   for (i = N.size() - 1; i >= 0; i--){
      |              ^~~~
a.cc:12:26: error: request for member 'size' in 'N', which is of non-class type 'int'
   12 |     f_N += N / pow(10, N.size() - 1);  //最上位の数字取得
      |                          ^~~~
a.cc:13:23: error: request for member 'size' in 'N', which is of non-class type 'int'
   13 |     a = N / pow(10, N.size() - 1);
      |                       ^~~~
a.cc:14:25: error: request for member 'size' in 'N', which is of non-class type 'int'
   14 |     N -=  a * pow(10, N.size() - 1); // N更新
      |                         ^~~~
Language: C++

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

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

  //.size()で桁数取得&10で割って各位の数字を取得

  for (int i = N.size() - 1; i >= 0; i--){
    f_N += N / pow(10, N.size() - 1);  //最上位の数字取得
    a = N / pow(10, N.size() - 1);
    N -=  a * pow(10, N.size() - 1); // N更新
    
  }

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


Compiler output:
a.cc:2:10: error: #include expects "FILENAME" or <FILENAME>
    2 | #include pow <math.h>
      |          ^~~
a.cc: In function 'int main()':
a.cc:11:18: error: request for member 'size' in 'N', which is of non-class type 'int'
   11 |   for (int i = N.size() - 1; i >= 0; i--){
      |                  ^~~~
a.cc:12:26: error: request for member 'size' in 'N', which is of non-class type 'int'
   12 |     f_N += N / pow(10, N.size() - 1);  //最上位の数字取得
      |                          ^~~~
a.cc:13:23: error: request for member 'size' in 'N', which is of non-class type 'int'
   13 |     a = N / pow(10, N.size() - 1);
      |                       ^~~~
a.cc:14:25: error: request for member 'size' in 'N', which is of non-class type 'int'
   14 |     N -=  a * pow(10, N.size() - 1); // N更新
      |                         ^~~~
Language: C++

using namespace std;
#include <iostream>

int main() {
  int x;
  cin>>x;
  
  int f;
  n = x;
  while (true){
    f += n%10;
    n /= 10;
    if (n==0) break;
  }
  
  cout << (x%f?"No":"Yes") << endl;

  return 0;
}


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

#include <iostream>
using namespace std;

// 各桁の和を計算する関数
int findSumOfDigits(int n) {
	int sum = 0;
	while (n > 0) { // n が 0 になるまで
	sum += n % 10;
	n /= 10;
}
return sum;
}

int main() {
	int n;
	cin>>n;
	int sum = findSumOfDigits(i); // i の各桁の和
	if(n%sum==0){
		cout << "Yes" << endl;
	}else{
		cout << "No" << endl;
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:35: error: 'i' was not declared in this scope
   17 |         int sum = findSumOfDigits(i); // i の各桁の和
      |                                   ^