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

#include "bits/stdc++.h"
using namespace std;
#define MOD 1000000007
#define Nmax 200010
#define FOR(i,a,b) for(long long i=(a);i<(b);i++)
#define REP(i,n)  FOR(i,0,n)
#define ITR(itr,mp) for(auto itr = (mp).begin(); itr != (mp).end(); ++itr)
#define dump(x)  cout << #x << " = " << (x) << endl;
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
typedef long long ll;

int main() {
	string S;
	cin >> S;
	ll sum=0,ori=0;
	int i=0;
	ori = stoi(S);
	while(!S[i]){
		sum+=stoi(S[i]);
		i++;
	}
	if(ori%sum==0) cout << "Yes" << endl;
	else cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:26: error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   19 |                 sum+=stoi(S[i]);
      |                      ~~~~^~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:4164:3: note: candidate: 'int std::__cxx11::stoi(const std::string&, std::size_t*, int)'
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4164:22: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::string&' {aka 'const std::__cxx11::basic_string<char>&'}
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:4432:3: note: candidate: 'int std::__cxx11::stoi(const std::wstring&, std::size_t*, int)'
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4432:23: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::wstring&' {aka 'const std::__cxx11::basic_string<wchar_t>&'}
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~~^~~~~
Language: C++

#include <iostream>
#include <math.h>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:3: error: expected '}' before 'else'
   16 |   else {cout << "No" << endl;}}
      |   ^~~~
a.cc:15:20: note: to match this '{'
   15 |   if ( N % s == 0) {cout << "Yes" <<endl;
      |                    ^
a.cc: At global scope:
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^
Language: C++

#incldue <iostream>
#include <math.h>

using namespace std;

int main (){
  int N;
  int s;
  cin >> N;
  for ( int i=1 ; i < 9 ; ++i){
	s += N % 10;
    N = N / 10;
  }
  
  if ( N % s == 0) {cout << "yes" <<endl;}
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incldue; did you mean #include?
    1 | #incldue <iostream>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:9:3: error: 'cin' was not declared in this scope
    9 |   cin >> N;
      |   ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <math.h>
  +++ |+#include <iostream>
    3 | 
a.cc:15:21: error: 'cout' was not declared in this scope
   15 |   if ( N % s == 0) {cout << "yes" <<endl;}
      |                     ^~~~
a.cc:15:21: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:37: error: 'endl' was not declared in this scope
   15 |   if ( N % s == 0) {cout << "yes" <<endl;}
      |                                     ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <math.h>
  +++ |+#include <ostream>
    3 |
Language: C++

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

int main()
{
  int x;
  cin >> x;
  int y = x;
  int ax[9];
  for (int i = 8; i >= 0; i--) {
    if (i != 0) {
      int p = pwr(10, i);
      a[i] = x / p;
      y -= x * p;
    }
    if (i == 0) {
      a[0] = y % 10;
    }
  }
  
  int fx;
  for (int i = 0; i < 9; i++) {
    fx += a[i];
  }
  if (x % fx == 0)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:15: error: 'pwr' was not declared in this scope
   13 |       int p = pwr(10, i);
      |               ^~~
a.cc:14:7: error: 'a' was not declared in this scope
   14 |       a[i] = x / p;
      |       ^
a.cc:18:7: error: 'a' was not declared in this scope
   18 |       a[0] = y % 10;
      |       ^
a.cc:24:11: error: 'a' was not declared in this scope
   24 |     fx += a[i];
      |           ^
Language: C++

#include <iostream>
using namespace std;

int main()
{
  int x;
  cin >> x;
  int y = x;
  int ax[9];
  for (int i = 8; i >= 0; i--) {
    if (i != 0) {
      int p = pwr(10, i);
      a[i] = x / p;
      y -= x * p;
    }
    if (i == 0) {
      a[0] = y % 10;
    }
  }
  
  int fx;
  for (int i = 0; i < 9; i++) {
    fx += a[i];
  }
  if (x % fx == 0)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: 'pwr' was not declared in this scope
   12 |       int p = pwr(10, i);
      |               ^~~
a.cc:13:7: error: 'a' was not declared in this scope
   13 |       a[i] = x / p;
      |       ^
a.cc:17:7: error: 'a' was not declared in this scope
   17 |       a[0] = y % 10;
      |       ^
a.cc:23:11: error: 'a' was not declared in this scope
   23 |     fx += a[i];
      |           ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  int n,fx=0,mod;
  string ans;
  cin>>n;
  mod=n;
  for(int i=0;i<9;i++)
  {
    fxmod%10;
    mod/=10;
  }

  if(n/fx==0) ans="Yes";
  else ans="No";

  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'fxmod' was not declared in this scope; did you mean 'mod'?
   11 |     fxmod%10;
      |     ^~~~~
      |     mod
Language: Java

import java.util.Scanner;

public class Main {
    public static void main(String [] args){
        Scanner sc = new Scanner(System.in);
        long N = sc.nextInt();
        String  a = String.valueOf(N);
        char b[] = new char[a.length()];
        for (int i=0;i<a.length();i++){
            b[i] = a.charAt(i);
        }
        int divid =0;
        for (int i=0;i<a.length();i++){
            divid += b[i];
        }
        if(N % divid ==0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }

Compiler output:
Main.java:21: error: reached end of file while parsing
    }
     ^
1 error
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:4: error: 'n' was not declared in this scope
   13 | if(n%fx==0)ans="Yes";
      |    ^
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<string>
#include<cstring>
using namespace std;
typedef long long lng;
typedef unsigned long long ulng;

#define pb push_back
#define SZ(a) int((a).size())
#define ALL(a) (a).begin(), (a).end
#define FOR(i,a,b) for(int i=(a); i<=(b); ++i)
#define FORD(i,b,a) for(int i=(b); i>=(a); --i)
#define REP(i,n) FOR(i,0,n-1)
#define UNIQUE(a) a.erase(unique(ALL(a)), a.end())

lng power(lng b, lng e) {lng sol=1; while(e>0) {if(e&1) {sol=sol*b;} e>>=1; b*= b;} return sol;}



int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
  
 int N;
  cin >> N;
  int n2 = N;
  
  int hs = 0;
  while(n2 > 0) {
hs += n2%10;
    n2 /= 10;
  }
  if(N%hs) {
cout << "No" << endl;
    else
      cout << "Yes" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:39:5: error: expected '}' before 'else'
   39 |     else
      |     ^~~~
a.cc:37:12: note: to match this '{'
   37 |   if(N%hs) {
      |            ^
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<string>
#include<cstring>
using namespace std;
typedef long long lng;
typedef unsigned long long ulng;

#define pb push_back
#define SZ(a) int((a).size())
#define ALL(a) (a).begin(), (a).end
#define FOR(i,a,b) for(int i=(a); i<=(b); ++i)
#define FORD(i,b,a) for(int i=(b); i>=(a); --i)
#define REP(i,n) FOR(i,0,n-1)
#define UNIQUE(a) a.erase(unique(ALL(a)), a.end())

lng power(lng b, lng e) {lng sol=1; while(e>0) {if(e&1) {sol=sol*b;} e>>=1; b*= b;} return sol;}



int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
  
  string str;
  cin >> str;
  int N = stoi(str);
  
  int hs = 0;
  REP(i, str.size()) {
	hs += stoi(str[i]);
  }
  if(N%hs) {
cout << "No" << endl;
    else
      cout << "Yes" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:19: error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   34 |         hs += stoi(str[i]);
      |               ~~~~^~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:4164:3: note: candidate: 'int std::__cxx11::stoi(const std::string&, std::size_t*, int)'
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4164:22: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::string&' {aka 'const std::__cxx11::basic_string<char>&'}
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:4432:3: note: candidate: 'int std::__cxx11::stoi(const std::wstring&, std::size_t*, int)'
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4432:23: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::wstring&' {aka 'const std::__cxx11::basic_string<wchar_t>&'}
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~~^~~~~
a.cc:38:5: error: expected '}' before 'else'
   38 |     else
      |     ^~~~
a.cc:36:12: note: to match this '{'
   36 |   if(N%hs) {
      |            ^
Language: C++

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


Compiler output:
a.cc:1:20: warning: extra tokens at end of #include directive
    1 | #include <cstdio > int N; 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"); }
      |                    ^~~
a.cc:1:10: fatal error: cstdio : No such file or directory
    1 | #include <cstdio > int N; int main() { scanf("%d",&N); int t=N,c=0; while(t>0)c+=t%10,t/=10; if(N%c==0)puts("Yes"); else puts("No"); }
      |          ^~~~~~~~~
compilation terminated.
Language: C++

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

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


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



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

using namespace std;
int _f(int b);
int f(int c);
int _f(int b) {
	int count = 0;
	while (b > 0) {
		b = b / 10;
		count++;
	}
	return count;
}
int f(int c) {
	int n = _f(c);
	int ans = 0;
	for (int i = n-1; i >0; i--) {
		int x = c / std::pow(10, i);
		ans += x;
		c -= (x * std::pow(10, i));
	}
	ans += c;
	return ans;
}
int main()
{
	int a,x=1;
	string yn[2] = { "Yes","No" };
	cin >> a;
	if (a%f(a) == 0) x = 0;
	cout << yn[x] << endl;
    return 0;
}



Compiler output:
a.cc: In function 'int f(int)':
a.cc:23:34: error: 'pow' is not a member of 'std'
   23 |                 int x = c / std::pow(10, i);
      |                                  ^~~
a.cc:25:32: error: 'pow' is not a member of 'std'
   25 |                 c -= (x * std::pow(10, i));
      |                                ^~~
Language: C++

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

using namespace std;
int _f(int b) {
	int count = 0;
	while (b > 0) {
		b = b / 10;
		count++;
	}
	return count;
}
int f(int c) {
	int n = _f(c);
	int ans = 0;
	for (int i = n-1; i >0; i--) {
		int x = c / pow(10, i);
		ans += x;
		c -= (x * pow(10, i));
	}
	ans += c;
	return ans;
}
int main()
{
	int a,x=1;
	string yn[2] = { "Yes","No" };
	cin >> a;
	if (a%f(a) == 0) x = 0;
	cout << yn[x] << endl;
    return 0;
}



Compiler output:
a.cc: In function 'int f(int)':
a.cc:19:29: error: 'pow' was not declared in this scope
   19 |                 int x = c / pow(10, i);
      |                             ^~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: expected ',' or ';' before 'string'
    5 |   string N;
      |   ^~~~~~
a.cc:6:8: error: 'N' was not declared in this scope
    6 |   cin>>N;
      |        ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string N;
  cin>>N;
  for(int i=0;i<N.)

Compiler output:
a.cc: In function 'int main()':
a.cc:6:19: error: expected unqualified-id before ')' token
    6 |   for(int i=0;i<N.)
      |                   ^
a.cc:6:19: error: expected ';' before ')' token
    6 |   for(int i=0;i<N.)
      |                   ^
      |                   ;
a.cc:6:20: error: expected statement at end of input
    6 |   for(int i=0;i<N.)
      |                    ^
a.cc:6:20: error: expected '}' at end of input
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

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

int main() {
  int N,i = 8,a[9],s = 0;cin >> N;

  while(i > 0){
    a[i] = N / std::pow(10,i-1);
    s += a[i]
    N -= 10 * std::pow(10,i-1);
  }

  if(N%X) cout <<"No";
  else cout <<"Yes";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: expected ';' before 'N'
    9 |     s += a[i]
      |              ^
      |              ;
   10 |     N -= 10 * std::pow(10,i-1);
      |     ~         
a.cc:13:8: error: 'X' was not declared in this scope
   13 |   if(N%X) cout <<"No";
      |        ^
Language: C++

#include <iostream>
#include <string>
int main() {

	std::string s;
	std::cin >> s;

	int sum = 0;
	for (int i = 0; i < s.length; i++)
		sum += ('0' + s[i]);
	if (std::stoi(s) % sum == 0)
		std::cout << "Yes" << std::endl;
	else
		std::cout << "No" << std::endl;

	return 0;
}

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

#include <iostream>
#include <string>
int main() {

	string s;
	cin >> s;

	int sum = 0;
	for (int i = 0; i < s.length; i++)
		sum += ('0' + s[i]);
	if (std::stoi(s) % sum == 0)
		std::cout << "Yes" << std::endl;
	else
		std::cout << "No" << std::endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'string' was not declared in this scope
    5 |         string s;
      |         ^~~~~~
a.cc:5:9: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         cin >> s;
      |         ^~~
      |         std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:16: error: 's' was not declared in this scope
    6 |         cin >> s;
      |                ^
Language: C++

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

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


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

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

int main(){
    int N,s,a;
    s=0;
    scanf("%d",&N);
    a=N;
    while (N){
        s += N%10;
         N /= 10;
    }
    if ()
}



Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: expected primary-expression before ')' token
   13 |     if ()
      |         ^
a.cc:14:1: error: expected primary-expression before '}' token
   14 | }
      | ^
Language: C++

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

int main() {
  int = N;
  cin >> N;
  
  if (N>0 && N<11) cout << "Yes";
  else {
    int i = 0;
    while(i<8){
      if(N % (N % 10)!=0) break;
      else{
        N = N / (N % 10);
        i++;
      }
    }
    if(i==7) cout << "Yes";
    else cout << "No";
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: expected unqualified-id before '=' token
    5 |   int = N;
      |       ^
a.cc:6:10: error: 'N' was not declared in this scope
    6 |   cin >> N;
      |          ^
Language: C++

#include <iostream>
using namespace std;

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

int main(){
  int N;
  cin >> N;
  int sum = sumofd(N);
  if(sum%N == 0) cout << "YES" << endl;
  else cout << "NO" << endl;
}
  

Compiler output:
a.cc: In function 'int sumofd(int)':
a.cc:6:9: error: 'n' was not declared in this scope
    6 |   while(n>0){
      |         ^
Language: C++

                                                                                                
  
int main(void){
                                                                                                
   
    int n,t;

    int f = 0;
   
      
    scanf("%d", &n);
   

    for( t = n ; t > 0 ; t = t / 10 ){

        f += t % 10;

        }


    if( n % f == 0 ) printf("Yes\n");

    else printf("No\n");


    return 0;
                                                          
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'scanf' was not declared in this scope
   11 |     scanf("%d", &n);
      |     ^~~~~
a.cc:21:22: error: 'printf' was not declared in this scope
   21 |     if( n % f == 0 ) printf("Yes\n");
      |                      ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | 
a.cc:23:10: error: 'printf' was not declared in this scope
   23 |     else printf("No\n");
      |          ^~~~~~
a.cc:23:10: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:12: error: lvalue required as left operand of assignment
   15 |     if(sum % x = 0) cout << "Yes" << endl;
      |        ~~~~^~~
Language: C++

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

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

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

#include <map>
#include <list>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#define fast ios::sync_with_stdio(0),cin.tie(0),cout.tie(0)
using namespace std;
int n,sum;
int main()
{
	fast;
	cin>>n;
	int n1=n;
	while (n1!=0)
	{
		sum+=n1%10;
		n1/=10;
	}1
	if (n%sum==0)
	   cout<<"Yes";
	else
	   cout<<"No";
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:11: error: expected ';' before 'if'
   20 |         }1
      |           ^
      |           ;
   21 |         if (n%sum==0)
      |         ~~ 
a.cc:23:9: error: 'else' without a previous 'if'
   23 |         else
      |         ^~~~
Language: C++

#include <iostream>
using namespace std;

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: 'fucn' was not declared in this scope; did you mean 'func'?
   13 |     int S = fucn(N);
      |             ^~~~
      |             func
Language: C++

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

int main(){
	string X;
	cin >> X;
	int x=0;
	for(int i=0; i<X.size(); i++){
		x += stoi(&X[i]);
	}
	if(stoi[&X]%x==0) cout << "Yes";
	else cout << "No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: invalid types '<unresolved overloaded function type>[std::string* {aka std::__cxx11::basic_string<char>*}]' for array subscript
   12 |         if(stoi[&X]%x==0) cout << "Yes";
      |                ^
Language: C++

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

int main(){
	string X;
	cin >> X;
	int x=0;
	for(int i=0; i<X.size(); i++){
		x += stoi(&X[i]);
	}
	if(stoi[X]%x==0) cout << "Yes";
	else cout << "No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: no match for 'operator[]' (operand types are '<unresolved overloaded function type>' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   12 |         if(stoi[X]%x==0) cout << "Yes";
      |                ^
Language: C++

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

int main(){
	string X;
	cin >> X;
	int x=0;
	for(int i=0; i<X.size(); i++){
		x += stoi(X[i]);
	}
	if(stoi[X]%x==0) cout << "Yes";
	else cout << "No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:26: error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   10 |                 x += stoi(X[i]);
      |                      ~~~~^~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:4164:3: note: candidate: 'int std::__cxx11::stoi(const std::string&, std::size_t*, int)'
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4164:22: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::string&' {aka 'const std::__cxx11::basic_string<char>&'}
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:4432:3: note: candidate: 'int std::__cxx11::stoi(const std::wstring&, std::size_t*, int)'
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4432:23: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::wstring&' {aka 'const std::__cxx11::basic_string<wchar_t>&'}
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~~^~~~~
a.cc:12:16: error: no match for 'operator[]' (operand types are '<unresolved overloaded function type>' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   12 |         if(stoi[X]%x==0) cout << "Yes";
      |                ^
Language: C++

#include <iostream>
using namespace std;

int main(){
	string X;
	cin >> X;
	int x=0;
	for(int i=0; i<X.size(); i++){
		x += stoi(X[i]);
	}
	if(stoi[X]%x==0) cout << "Yes";
	else cout << "No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
    9 |                 x += stoi(X[i]);
      |                      ~~~~^~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:4164:3: note: candidate: 'int std::__cxx11::stoi(const std::string&, std::size_t*, int)'
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4164:22: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::string&' {aka 'const std::__cxx11::basic_string<char>&'}
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:4432:3: note: candidate: 'int std::__cxx11::stoi(const std::wstring&, std::size_t*, int)'
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4432:23: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::wstring&' {aka 'const std::__cxx11::basic_string<wchar_t>&'}
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~~^~~~~
a.cc:11:16: error: no match for 'operator[]' (operand types are '<unresolved overloaded function type>' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   11 |         if(stoi[X]%x==0) cout << "Yes";
      |                ^
Language: C++

//AtCoder problemsに反映されないため再提出

import java.util.*;
 
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int NN = N;
		int fx = 0;
		while (N > 0) {
			fx += N % 10;
			N /= 10;
		}
		System.out.println(NN % fx == 0 ? "Yes" : "No");
	}
}

Compiler output:
a.cc:3:1: error: 'import' does not name a type
    3 | import java.util.*;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: expected unqualified-id before 'public'
    5 | public class Main {
      | ^~~~~~
Language: C++

#include<iostream>
using namespace std; 
 int main()
{
int a,b,c,d,N;
cin >> N ;
a = N%10
b = (N-a)%100/10
c = (N-10*b-a)%1000/100
d = (N-N%1000)/1000
if(N%(a+b+c+d)==0){printf("Yes")}
else{printf("No")}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: expected ';' before 'b'
    7 | a = N%10
      |         ^
      |         ;
    8 | b = (N-a)%100/10
      | ~        
a.cc:12:1: error: 'else' without a previous 'if'
   12 | else{printf("No")}
      | ^~~~
a.cc:12:18: error: expected ';' before '}' token
   12 | else{printf("No")}
      |                  ^
      |                  ;
Language: C++

#include "stdafx.h"

#include "stdio.h"


int main(void){

	int N;
	int N_digi[8];
	int i, bai=1;
	int sum = 0;

	scanf("%d", &N);

	for(i=0;i<8;i++)
	{
		bai*=10;
		N_digi[i] = ((N%bai)*10)/bai ;
		sum = sum + N_digi[i];
	}

	if(N%sum == 0)
	{
		printf("Yes\n");
	}
	else
	{
		printf("No\n");
	}
	return 0;
}

Compiler output:
a.cc:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: Java

import java.util.*;
public class Main{
    public static void main(String[]args){
        Scanner in=new Scanner(System.in);
        int N=in.nextInt();
        String ｓ=String.valueOf(N);
        Char []ss=s.toCharArray;
        String[] sss=new String(ss);
        int sum=0;
        for(int i=0;i<ss.length;i++){
            int a=Integer.parseInt(sss[i]);
            sum+=a;}
        if(N%sum==0){
            System.out.println("Yes");
        }else{System.out.println("No");}
    }
}

Compiler output:
Main.java:7: error: cannot find symbol
        Char []ss=s.toCharArray;
        ^
  symbol:   class Char
  location: class Main
Main.java:7: error: cannot find symbol
        Char []ss=s.toCharArray;
                  ^
  symbol:   variable s
  location: class Main
Main.java:8: error: incompatible types: String cannot be converted to String[]
        String[] sss=new String(ss);
                     ^
3 errors
Language: Java

import java.util.*;
public class Main{
    public static void main(String[]args){
        Scanner in=new Scanner(System.in);
        int N=in.nextInt();
        String ｓ=String.valueOf(N);
        char []ss=s.toCharArray;
        String[] sss=new String(ss);
        int sum=0;
        for(int i=0;i<ss.length;i++){
            int a=Integer.parseInt(sss[i]);
            sum+=a;}
        if(N%sum==0){
            System.out.println("Yes");
        }else{System.out.println("No");}
    }
}

Compiler output:
Main.java:7: error: cannot find symbol
        char []ss=s.toCharArray;
                  ^
  symbol:   variable s
  location: class Main
Main.java:8: error: incompatible types: String cannot be converted to String[]
        String[] sss=new String(ss);
                     ^
2 errors
Language: C

#include<bits/stdc++.h>
int main()
{
    int n,j,sum=0;
    scanf("%d",&n);
    j=n;
    while(n>0)
    {
   sum+=n%10;
     n/=10;
    }

    if(j%sum==0){
    printf("Yes");
    }
    else {
    printf("No");
    }
   return 0;
}


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

#include<stdio.h>
int main()
{
int x,y,z,sum=0;
scanf("%d",&x);
z=x;
while(z>0)
{
y=z%10;
sum=sum+y;
z=z/10;
}
if(x%sum==0)
printf("YES\n");
else
printf("NO\n");
getch();
return 0;


Compiler output:
main.c: In function 'main':
main.c:17:1: error: implicit declaration of function 'getch'; did you mean 'getc'? [-Wimplicit-function-declaration]
   17 | getch();
      | ^~~~~
      | getc
main.c:18:1: error: expected declaration or statement at end of input
   18 | return 0;
      | ^~~~~~
Language: C++

#include <stdio.h>
#include <stdlib.h>
int main(){
  char num[100];int i,sum=0,no;
  scanf("%s",num);
  for (i = 0; i < strlen(num); i++) sum+=num[i];
  no = atoi(num);
  if(!no/sum) printf("Yes");
  else printf("No");
  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:6:19: error: 'strlen' was not declared in this scope
    6 |   for (i = 0; i < strlen(num); i++) sum+=num[i];
      |                   ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <stdlib.h>
  +++ |+#include <cstring>
    3 | int main(){
Language: C++

#include<cstdio>
#include<iostream>
using namespace std;
ifstream fin("cc.in");
ofstream fout("cc.in");
int main()
{
long long n;
int we=0;
char stri[10];
char *now;
cin>>n;
fout<<n;
fin>>stri;
now=stri;
while(*now!='\0')
{
we+=(int)(*now)-48;
now++;
}
if(n%we==0)
{cout<<"Yes";}
else
{cout<<"No";}
return 0;
}

Compiler output:
a.cc:4:13: error: variable 'std::ifstream fin' has initializer but incomplete type
    4 | ifstream fin("cc.in");
      |             ^
a.cc:3:1: note: 'std::ifstream' is defined in header '<fstream>'; this is probably fixable by adding '#include <fstream>'
    2 | #include<iostream>
  +++ |+#include <fstream>
    3 | using namespace std;
a.cc:5:14: error: variable 'std::ofstream fout' has initializer but incomplete type
    5 | ofstream fout("cc.in");
      |              ^
a.cc:5:14: note: 'std::ofstream' is defined in header '<fstream>'; this is probably fixable by adding '#include <fstream>'
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string s;
  cin >> s;
  ll tmp = 0;
  for (int i = 0; i < s.size(); ++i) tmp += (s[i]-'0');
  cout << ( (tmp%n==0) ? "Yes" : "No" ) << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'll' was not declared in this scope
    7 |   ll tmp = 0;
      |   ^~
a.cc:8:38: error: 'tmp' was not declared in this scope; did you mean 'tm'?
    8 |   for (int i = 0; i < s.size(); ++i) tmp += (s[i]-'0');
      |                                      ^~~
      |                                      tm
a.cc:9:14: error: 'tmp' was not declared in this scope; did you mean 'tm'?
    9 |   cout << ( (tmp%n==0) ? "Yes" : "No" ) << endl;
      |              ^~~
      |              tm
a.cc:9:18: error: 'n' was not declared in this scope
    9 |   cout << ( (tmp%n==0) ? "Yes" : "No" ) << endl;
      |                  ^
Language: C++

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

int main() {
  string s;
  cin >> s;
  ll tmp = 0;
  for (int i = 0; i < s.size(); ++i) tmp += (s[i]-'0');
  cout << ( (tmp%n==0) ? "Yes" : "No" ) << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'll' was not declared in this scope
    7 |   ll tmp = 0;
      |   ^~
a.cc:8:38: error: 'tmp' was not declared in this scope; did you mean 'tm'?
    8 |   for (int i = 0; i < s.size(); ++i) tmp += (s[i]-'0');
      |                                      ^~~
      |                                      tm
a.cc:9:14: error: 'tmp' was not declared in this scope; did you mean 'tm'?
    9 |   cout << ( (tmp%n==0) ? "Yes" : "No" ) << endl;
      |              ^~~
      |              tm
a.cc:9:18: error: 'n' was not declared in this scope
    9 |   cout << ( (tmp%n==0) ? "Yes" : "No" ) << endl;
      |                  ^
Language: C

#include <stdio.h>
int main(){
  char n[10];
  int f=0,x=0,i=0,p=1;
  scanf("%s",n);
  for(;n[i]!='\0';i++){
    f+=n[i];
  }
  for(i--;i>=0;i--){
    x+=n[i]*p
    p*=10;
  }
  printf((x%f)?"No":"Yes");
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:14: error: expected ';' before 'p'
   10 |     x+=n[i]*p
      |              ^
      |              ;
   11 |     p*=10;
      |     ~
Language: C++

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

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

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

Compiler output:
a.cc: In function 'int sum(int)':
a.cc:12:17: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   12 |         int main()
      |                 ^~
a.cc:12:17: note: remove parentheses to default-initialize a variable
   12 |         int main()
      |                 ^~
      |                 --
a.cc:12:17: note: or replace parentheses with braces to value-initialize a variable
a.cc:13:5: error: a function-definition is not allowed here before '{' token
   13 |     {
      |     ^
a.cc:22:1: warning: no return statement in function returning non-void [-Wreturn-type]
   22 | }
      | ^
Language: C++

#include "stdafx.h"

#include "iostream"
using namespace std;
int main()
{
	int N,temp,f;
	f = 0;
	cin >> N;
	temp = N;
	while (temp != 0){ 
		f += temp % 10;
		temp /= 10;
	}
	if (N%f == 0)cout << "yes" << endl;
	else cout << 'no' << endl;
	return 0;
}

Compiler output:
a.cc:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include "stdafx.h"

#include "iostream"
using namespace std;
int main()
{
	int N,temp,f;
	cin >> N;
	while (temp != 0){ 
		f += temp % 10;
		temp /= 10;
	}
	if (N%f == 0)cout << "yes" << endl;
	else cout << 'no' << endl;
	return 0;
}


Compiler output:
a.cc:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

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

int main()
{
	int n,a,b;
	int sum1=0,sum2=0;
	
	cin>>n>>a>>b;
	
	for(int i=1;i<=n;i++)
	{
		int t;
		t=i;
		
		sum1=0;
		while(t!=0){
			sum1+=t%10;
			t=t/10;
		}
		
		if(sum1>=a&&sum1<=b)
		   sum2=sum2+sum1;
	}
	
	cout<<num2;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:15: error: 'num2' was not declared in this scope; did you mean 'sum2'?
   26 |         cout<<num2;
      |               ^~~~
      |               sum2
Language: C++

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

int main()
{
   int s=0,n,g,x;
   cin>>n;
   for(n=0;n<=n;n++)
   g=n%10;
   if g<=x; 
   s++;
   cout<<s<<endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: expected '(' before 'g'
   10 |    if g<=x;
      |       ^
      |       (
Language: C++

#include<iostream>
#include <cmath>
using namespace std;
int main(){
 	int a,b,n,c=0,sum,i;
 	cin >> n >> a >> b;
 	if (a>b)
 		swap(a,b);
 	for (int j=1;j<=n;j++)
 	{
 	 i=j;
	while(i>0){
		sum+=i%10;
		i=i/10;
	}
	if (sum<=b && sum>=a0
		c+=j;
	}
	cout << c;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:28: error: 'a0' was not declared in this scope; did you mean 'a'?
   16 |         if (sum<=b && sum>=a0
      |                            ^~
      |                            a
a.cc:18:9: error: expected primary-expression before '}' token
   18 |         }
      |         ^
a.cc:17:22: error: expected ')' before '}' token
   17 |                 c+=j;
      |                      ^
      |                      )
   18 |         }
      |         ~             
a.cc:16:12: note: to match this '('
   16 |         if (sum<=b && sum>=a0
      |            ^
a.cc:18:9: error: expected primary-expression before '}' token
   18 |         }
      |         ^
Language: C++

#include<iostream>
#include <cmath>
using namespace std;
int main(){
 	int a,b,n,c=0,sum;
 	cin >> n >> a >> b;
 	if (a>b)
 		swap(a,b);
 	for (int j=1;j<=n;j++)
 	{
 	 i=j;
	while(i>0){
		sum+=i%10;
		i=i/10;
	}
	c+=sum;
	}
	cout << c;
	return 0;
}

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

#include<iostream>
#include <cmath>
using namespace std;
int main(){
 	int a,b,n,c=0,sum;
 	cin >> n >> a >> b;
 	if (a>b)
 		swap(a,b);
 	x=n;
 	for (int j=1;j<=n;j++)
 	{
 	 i=j;
	while(i>0){
		sum+=i%10;
		i=i/10;
	}
	c+=sum;
	}
	cout << c;
	return 0;
}

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

    #include <iostream>
    #include <math.h>
     
    using namespace std;
     
    int main(){
    	int n, a, b, temp, ans;
    	cin >> n >> a >> b;
    	ans = 0;
    	
    	for(int i =0 ; i<n ; ++i){
    		temp = 0;
    		for(int j=0;j<4;j++){
    			temp += (n/pow(10,j)) % 10;
    		}
    		if(ans>=a && ans <= b){
    			ans += i;
    		}
    	}
    	
    	cout << i << endl;
    	
    	return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:14:47: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'int' to binary 'operator%'
   14 |                         temp += (n/pow(10,j)) % 10;
      |                                 ~~~~~~~~~~~~~ ^ ~~
      |                                   |             |
      |                                   |             int
      |                                   __gnu_cxx::__promote<double>::__type {aka double}
a.cc:21:17: error: 'i' was not declared in this scope
   21 |         cout << i << endl;
      |                 ^
Language: C++

#include <iostream>
#include <math.h>

using namespace std;

int main(){
	int n, a, b, temp, ans;
	cin >> n >> a >> b;
	ans = 0;
	
	for(int i =0 ; i<n ; ++i){
		temp = 0;
		for(j=0;j<4;j++){
			temp += (n/pow(10,j)) % 10;
		}
		if(ans>=a && ans <= b){
			ans += i;
		}
	}
	
	cout << i << endl;
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: 'j' was not declared in this scope
   13 |                 for(j=0;j<4;j++){
      |                     ^
a.cc:21:17: error: 'i' was not declared in this scope
   21 |         cout << i << endl;
      |                 ^
Language: C++

//#include "stdafx.h"
#include <algorithm>
#include <iostream>
#include <string>
using namespace std;

int main()
{
	int n;
	cin >> n; //スペースで区切られたものを別々に入力

	int val=0;
	int X = 0;
	val = n;
	int counter=1;
	while (val > pow(10,counter)) {
		X += val % int(pow(10,counter++));
	}
	if (val % X == 0) {
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}

	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:16:22: error: 'pow' was not declared in this scope
   16 |         while (val > pow(10,counter)) {
      |                      ^~~
Language: C++


using namespace std;

int main()
{
    int n;
    cin>>n;
    int dig=n;
    int sum=0;
    while(dig){
        sum+=dig%10;
        dig/=10;
    }
    cout<<(n%sum==0?"Yes":"No")<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin>>n;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | 
a.cc:14:5: error: 'cout' was not declared in this scope
   14 |     cout<<(n%sum==0?"Yes":"No")<<endl;
      |     ^~~~
a.cc:14:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:34: error: 'endl' was not declared in this scope
   14 |     cout<<(n%sum==0?"Yes":"No")<<endl;
      |                                  ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 |
Language: C++

#include<iostream>
using namespace std;
int main()
{
	int n,x,a=0;
	cin>>n;
	x=n;
	while(x!=0)
	{
		a+=t%10;
		t=t/10
	 } 
	if(n/s==0)
		cout<<"Yes";
	else cout<<"No";
	return 0;
	
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: 't' was not declared in this scope
   10 |                 a+=t%10;
      |                    ^
a.cc:13:14: error: 's' was not declared in this scope
   13 |         if(n/s==0)
      |              ^
Language: C++

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

int main(){
	int n;
	cin>>n;
	int a[3];
	for(int i=1;i<=n;i++) a[i]=0;
	if(n.size()==2){
		a[1]=n%10;
		a[2]=n/10;
	}
	else if(n.size()==3){
		a[1]=n%10;
		a[2]=n/10%10;
		a[3]=n/100;
	} 
	else
		a[1]=n;
	if(n%(a[1]+a[2]+a[3])==0)
		cout<<"Yes"
	else
		cout<<"No"
	return 0;
}

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 |         if(n.size()==2){
      |              ^~~~
a.cc:15:19: error: request for member 'size' in 'n', which is of non-class type 'int'
   15 |         else if(n.size()==3){
      |                   ^~~~
a.cc:23:28: error: expected ';' before 'else'
   23 |                 cout<<"Yes"
      |                            ^
      |                            ;
   24 |         else
      |         ~~~~
Language: C++

#include <iostream>
using namespace std;
int main()
{
	long long n,a,b;
	cin>>n>>a>>b;
	if(a*s<b)
		cout<<a*s<<endl;
	else 
		cout<<b<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: 's' was not declared in this scope
    7 |         if(a*s<b)
      |              ^
Language: C++

#include <bits/stdc++>
using namespace std;
int f(int n)
{
    int temp=0;
    while(n)
    {
        temp+=n%10;
        n=n/10;
    }
    return temp;
}
int main()
{
        int x,m;
        scanf("%d",&x);
        m=f(x);
        if(x%m==0)
        {
                printf("YES");
        }
        else
        {
                printf("NO");
        }
        return 0;
}

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

#include <bits/stdc++>
using namespace std;
int f(int n)
{
    int temp=0;
    while(n)
    {
        temp+=n%10;
        n=n/10;
    }
    return temp;
}
int main()
{
    int temp=0;
    while(n)
    {
        temp+=n%10;
        n=n/10;
    }
    return temp;
}
int main()
{
        int x,m;
        scanf("%d",&x);
        m=f(x);
        if(x%m==0)
        {
                printf("YES");
        }
        else
        {
                printf("NO");
        }
        return 0;
}


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

#include <iostream>

using namespace std;

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

    int t = n;

    int f = 0;
    while (t) {
        f += t % 10;
        t /= 10;
    }

    cout << (n % f ? "No" : "Yes") << endl;

    return 0;
}
v

Compiler output:
a.cc:22:1: error: 'v' does not name a type
   22 | v
      | ^