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

n = gets.to_i
num = n
sum = 0
while n/10 > 0
	sum += n % 10
	n /= 10
end
sum += n % 10
if num % sum == 0
	puts "Yes"
else
	puts "No"
end


Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = gets.to_i
      | ^
Language: C

#include <stdio.h>
#include <string.h>

int main(){
  int N,x=0,S,n=10,i;
  scanf("%d",&N);
  i=N;
  while(1){
    x+=N%n;
    N-=N%n;
    if(N<x1)break;
  }
  if(i%x==0)printf("Yes\n");
  else printf("No\n");
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:11:10: error: 'x1' undeclared (first use in this function); did you mean 'x'?
   11 |     if(N<x1)break;
      |          ^~
      |          x
main.c:11:10: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <string.h>

int main(){
  char ;
  int N,x=0,S,n=10,i;
  scanf("%d",&N);
  i=N;
  while(1){
    x+=N%n;
    N-=N%n;
    if(N<x1)break;
  }
  if(i%x==0)printf("Yes\n");
  else printf("No\n");
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:5:3: warning: useless type name in empty declaration
    5 |   char ;
      |   ^~~~
main.c:12:10: error: 'x1' undeclared (first use in this function); did you mean 'x'?
   12 |     if(N<x1)break;
      |          ^~
      |          x
main.c:12:10: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(void){
  int N,sum = 0,i = 0,j;
  int S[11];
    
  scanf("%d",&N);
  N1 = N;
  
  while(N > 0){
    S[i] = N % 10;
    N = N / 10;
    i++;
  }
  for(j = 0;j < i;j++)
    sum = sum + S[j];
  printf("%d\n",sum);
  if(N1 % sum == 0)
    printf("Yes\n");
  else
    printf("No\n");
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:3: error: 'N1' undeclared (first use in this function); did you mean 'N'?
    8 |   N1 = N;
      |   ^~
      |   N
main.c:8:3: note: each undeclared identifier is reported only once for each function it appears in
Language: Java

public class Main {

	public static Scanner scanner = new Scanner(System.in);
	public static void main(String[] args) {
		String s = scanner.next();
		int mod = 0;
		for(int i=0; i<s.length(); i++) {
			int n = ((int)(s.charAt(0) - '0'));
			mod += n;
		}
		if(Long.valueOf(s) % mod == 0)
			System.out.println("Yes");
		else
			System.out.println("No");
	}

}


Compiler output:
Main.java:3: error: cannot find symbol
	public static Scanner scanner = new Scanner(System.in);
	              ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
	public static Scanner scanner = new Scanner(System.in);
	                                    ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

#include<stdio.h>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <list>
#include <map>     
#include <numeric>
#include <utility>
#include <queue>
#include <set>
#include <sstream>
#include <iomanip>
#include <stack>
#include <string>
#include <limits>
#include <vector>
using namespace std;
#define ll long long
#define ld long double
#define rep(a,t) for(int a=0;a<t;++a) 
#define forever while(true)
#define Sort(a) sort(a.begin(),a.end())
#define Reverse(a) reverse(a.begin(),a.end())
#define pb push_back
#define print_double(val,a) cout << fixed << setprecision(a) << val << endl;
ll mod = 1e9 + 7;
int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);
int a=0;
cin>>a;
string str=""+a+"";
int ans=0;
for(int i=0;i<str.length();i++){
	ans+=stoi(str.substr(i,1));
}
if(a%ans==0){cout<<"Yes"<<endl;}
else{cout<<"No"<<endl;}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:16: error: invalid operands of types 'const char*' and 'const char [1]' to binary 'operator+'
   42 | string str=""+a+"";
      |            ~~~~^~~
      |              |  |
      |              |  const char [1]
      |              const char*
Language: C++

#include<bits/stdc++.h>

using namespace std;
string s;
vector<int> v;
int main(){ 

int ans =0;
cin>>s ;
int cnt =0;
for(int i=0;i <s.size();i ++){
cnt +=stoi(s[i].c_str());
}
int num =stoi(s.c_str());
ans =num %cnt;
if(ans ==0)cout<<"Yes"<<endl;
else cout<<"No"<<endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: request for member 'c_str' in 's.std::__cxx11::basic_string<char>::operator[](((std::__cxx11::basic_string<char>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
   12 | cnt +=stoi(s[i].c_str());
      |                 ^~~~~
Language: C

#include <stdio.h>

int main(void){
  int n,s;
  int n2,i;
  int ten = 1;
  scanf("%d",&n);
  n2 = n;
  while(i < 9){
    ten = ten * 10;
    s = s + n2 % ten;
    n2 = n2 - (n2 / ten) * ten;
  }
  if( n % s == 0)
    printf("Yes\n");
  else 
    printf("No\n");
  retutn 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:3: error: 'retutn' undeclared (first use in this function)
   18 |   retutn 0;
      |   ^~~~~~
main.c:18:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:9: error: expected ';' before numeric constant
   18 |   retutn 0;
      |         ^~
      |         ;
Language: C

#include <stdio.h>

int main(void){
  int n,s;
  int n2;
  int ten = 1;
  scanf("%d",&n);
  n2 = n;
  while(i < 9){
    ten = ten * 10;
    s = s + n2 % ten;
    n2 = n2 - (n2 / ten) * ten;
  }
  if( n % s == 0)
    printf("Yes\n");
  else 
    printf("No\n");
  retutn 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:9: error: 'i' undeclared (first use in this function)
    9 |   while(i < 9){
      |         ^
main.c:9:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:3: error: 'retutn' undeclared (first use in this function)
   18 |   retutn 0;
      |   ^~~~~~
main.c:18:9: error: expected ';' before numeric constant
   18 |   retutn 0;
      |         ^~
      |         ;
Language: C++

#include<bits/stdc++.h>

using namespace std;
string s;
vector<int> v;
int main(){ 

int ans =0;
cin>>s ;
int cnt =0;
for(int i=0;i <s.size();i ++){
cnt +=atoi(s[i].c_str());
}
int num =stoi(s.c_str());
ans =num %cnt;
if(ans ==0)cout<<"Yes"<<endl;
else cout<<"No"<<endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: request for member 'c_str' in 's.std::__cxx11::basic_string<char>::operator[](((std::__cxx11::basic_string<char>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
   12 | cnt +=atoi(s[i].c_str());
      |                 ^~~~~
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main() {

	int n, sum, dig;
	cin >> n;
	while (n) {
		dig = n % 10;
		sum = sum + dig;
		n = n / 10;
		n--
	}

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

	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:20: error: expected ';' before '}' token
   14 |                 n--
      |                    ^
      |                    ;
   15 |         }
      |         ~
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main(){
    int n, sum;
    cin >> n;
    string str = to_string(n);
    int l = str.length();
    for(int i = 0; i < l; i++){
        sum += stoi(str[i]);
    }
    if(n % sum == 0){
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:20: error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   12 |         sum += 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)
      |        ~~~~~~~~~~~~~~~^~~~~
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main(){
    int n, sum;
    cin >> n;
    string str = to_string(n);
    int l = str.length();
    for(int i = 0; i < l; i++){
        sum += atoi(str[i]);
    }
    if(n % sum == 0){
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:20: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
   12 |         sum += atoi(str[i]);
      |                ~~~~^~~~~~~~
      |                    |
      |                    __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/ext/string_conversions.h:43,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 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/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
Language: C

#include <stdio.h>
int main(void){
    char num[10];
    int i,sum=0;

    scanf("%s",num);

    for(i=0;i<=11;i++)
      sum+=num[i];

    if(int(num)%sum ==0)
        printf("Yes");
    else    printf("No");

    return 0;
}

   

Compiler output:
main.c: In function 'main':
main.c:11:8: error: expected expression before 'int'
   11 |     if(int(num)%sum ==0)
      |        ^~~
Language: C

#include <stdio.h>
int main(void){
    char num[10];
    int sum=0;

    scanf("%s",num);

    for(i=0;i<=11;i++)
      sum+=num[i];

    if(int(num)%sum ==0)
        printf("Yes");
    else    printf("No");

    return 0;
}

   

Compiler output:
main.c: In function 'main':
main.c:8:9: error: 'i' undeclared (first use in this function)
    8 |     for(i=0;i<=11;i++)
      |         ^
main.c:8:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:8: error: expected expression before 'int'
   11 |     if(int(num)%sum ==0)
      |        ^~~
Language: C++

#include<bits/stdc++.h>

using namespace std;
string s;
vector<int> v;
int main(){ 

int ans =0;
cin>>s ;
int cnt =0;
for(int i=0;i <s.size();i ++){
cnt +=atoi(s[i]);
}
int num =stoi(s);
ans =num %cnt;
if(ans ==0)cout<<"Yes"<<endl;
else cout<<"No"<<endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
   12 | cnt +=atoi(s[i]);
      |       ~~~~^~~~~~
      |           |
      |           __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
                 from a.cc:1:
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
Language: C++

#include<bits/stdc++.h>

using namespace std;
string s;
vector<int> v;
int main(){ 

int ans =0;
cin>>s ;
int cnt =0;
for(int i=0;i <4;i ++){
cnt +=atoi(s[i]);
}
int num =stoi(s);
ans =num %cnt;
if(ans ==0)cout<<"Yes"<<endl;
else cout<<"No"<<endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
   12 | cnt +=atoi(s[i]);
      |       ~~~~^~~~~~
      |           |
      |           __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
                 from a.cc:1:
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
Language: C

include<stdio.h>

int main(void){
    int N, S, X;

	scanf("%d", &N);
    X = N;
	
	while(X!=0){
		S += X % 10;
		X /= 10;
	}

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

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C++

#include <iostream>
using namespace std;
int main() {
    long long N;
    int sum;
    cin >> N;
    while (N==0) {
        sum += N % 10;
        N = N / 10;
    }
    if (N % sum == 0) {
       cout << “YES” << endl;
    } else {
       cout << “NO” << endl;
    }
    return 0;
}


Compiler output:
a.cc:12:16: error: extended character “ is not valid in an identifier
   12 |        cout << “YES” << endl;
      |                ^
a.cc:12:16: error: extended character ” is not valid in an identifier
a.cc:14:16: error: extended character “ is not valid in an identifier
   14 |        cout << “NO” << endl;
      |                ^
a.cc:14:16: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:12:16: error: '\U0000201cYES\U0000201d' was not declared in this scope
   12 |        cout << “YES” << endl;
      |                ^~~~~
a.cc:14:16: error: '\U0000201cNO\U0000201d' was not declared in this scope
   14 |        cout << “NO” << endl;
      |                ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <sstream>


void getInput(std::vector<int> *v);
void dispV(std::vector<int> v);
void S(int n, int *s);

int main(void)
{
	//std::vector<std::string> v;
	std::vector<int> v;
	int num, s;

	// get array length
	getInput(&v);
	num = v[0];
	S(num, &s);

	if(num % s == 0) std::cout << "Yes" << std::endl;
	else std::cout << "No" << std::endl;

	/*
	while(v[0][i] != '\0') {
		//std::cout << v[0][i] << std::endl;
		if(v[0][i] == '+') num++;
		if(v[0][i] == '-') num--;
		i++;
	}

	std::cout << num << std::endl;
	*/



}

void getInput(std::vector<int> *v)
{
	std::string s, buf;
	std::getline(std::cin, s);
	std::stringstream ss(s);
	
	while(std::getline(ss, buf, ' ')) {
		(*v).push_back(std::stoi(buf));
	}
}

void dispV(std::vector<int> v)
{
	std::cout << "[";
	for(int i = 0; i < v.size(); i++) {
		//std::cout << i << ":" << v[i] << std::endl;
		std::cout << v[i] << ",";
	}
	std::cout << "]" << std::endl;
}

void S(int n, int *s) {
	while(n != 0.0) {
		(*s) += n % 10;
		n /= 10;


Compiler output:
a.cc: In function 'void S(int, int*)':
a.cc:64:25: error: expected '}' at end of input
   64 |                 n /= 10;
      |                         ^
a.cc:62:25: note: to match this '{'
   62 |         while(n != 0.0) {
      |                         ^
a.cc:64:25: error: expected '}' at end of input
   64 |                 n /= 10;
      |                         ^
a.cc:61:23: note: to match this '{'
   61 | void S(int n, int *s) {
      |                       ^
Language: C++

#include <iostream>
using namespace std;
int main() {
    long long N;
    int sum;
    cin >> N;
    while (N==0) {
        sum += N % 10;
        N = N / 10;
    }
    if (N % sum == 0) {
       cout << “YES”;
    } else {
       cout << “NO”;
    }
    return 0;
}

Compiler output:
a.cc:12:16: error: extended character “ is not valid in an identifier
   12 |        cout << “YES”;
      |                ^
a.cc:12:16: error: extended character ” is not valid in an identifier
a.cc:14:16: error: extended character “ is not valid in an identifier
   14 |        cout << “NO”;
      |                ^
a.cc:14:16: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:12:16: error: '\U0000201cYES\U0000201d' was not declared in this scope
   12 |        cout << “YES”;
      |                ^~~~~
a.cc:14:16: error: '\U0000201cNO\U0000201d' was not declared in this scope
   14 |        cout << “NO”;
      |                ^~~~
Language: C++

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

int ans =0;
cin>>s ;
int cnt =0;
for(int i=0;i <4;i ++){
cnt +=stoi(s[i]);
}
int num =stoi(s);
ans =num %cnt;
if(ans ==0)cout<<"Yes"<<endl;
else cout<<"No"<<endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   11 | cnt +=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<stdio.h>

int main(void){
  int n=0,tmp=0;
  scnaf("%d",&n);
  char buf[12];
  snprintf(buf,12,"%d",n);
  for(int i=0;i<strlen(buf);i++){
    tmp+=(buf[i]-'0');
  }
  if(n%tmp)printf("Yes\n");
  else printf("No\n");
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:3: error: implicit declaration of function 'scnaf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    5 |   scnaf("%d",&n);
      |   ^~~~~
      |   scanf
main.c:8:17: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    8 |   for(int i=0;i<strlen(buf);i++){
      |                 ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen'
    1 | #include<stdio.h>
  +++ |+#include <string.h>
    2 | 
main.c:8:17: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    8 |   for(int i=0;i<strlen(buf);i++){
      |                 ^~~~~~
main.c:8:17: note: include '<string.h>' or provide a declaration of 'strlen'
Language: C

#include <stdio.h>

int main(void){
        int n=0,tmp=0;
        scanf("%d",&n);
        char buf[12];
        snprintf(buf,12,"%d",n);

        for(int i=0;i<strlen(buf);i++){
                tmp+=(buf[i]-'0');
        }

        if(n%tmp==0) printf("Yes\n");
        else printf("No\n");

        return 0;
}                                                                                                           ~                                                                                                                       ~                                                                                                                       ~                                                 

Compiler output:
main.c: In function 'main':
main.c:9:23: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    9 |         for(int i=0;i<strlen(buf);i++){
      |                       ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen'
    1 | #include <stdio.h>
  +++ |+#include <string.h>
    2 | 
main.c:9:23: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    9 |         for(int i=0;i<strlen(buf);i++){
      |                       ^~~~~~
main.c:9:23: note: include '<string.h>' or provide a declaration of 'strlen'
main.c: At top level:
main.c:17:109: error: expected identifier or '(' before '~' token
   17 | }                                                                                                           ~                                                                                                                       ~                                                                                                                       ~
      |                                                                                                             ^
Language: C++

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

int ans =0;
cin>>s ;
int cnt =0;
for(int i=0;i <4;i ++){
cnt +=atoi(s[i]);
}
int num =atoi(s);
ans =num %cnt;
if(ans ==0)cout<<"Yes"<<endl;
else cout<<"No"<<endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
   11 | cnt +=atoi(s[i]);
      |       ~~~~^~~~~~
      |           |
      |           __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
                 from a.cc:1:
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:13:15: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   13 | int num =atoi(s);
      |               ^
      |               |
      |               std::string {aka std::__cxx11::basic_string<char>}
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
Language: C

#include<iostream>
#include<cstdio>
#include<string>
#include<typeinfo>

int main(){
    int N, S = 0;
    std::string input;
    std::cin >> input;
    for(int i = 0; i < input.size(); i++){
        S += (int)(input[i] - '0');
    }
    N = std::atoi(input.c_str());
    if(N % S == 0) printf("Yes");
    else printf("No");
    return 0;
}

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

#include <stdio.h>
 
int main(void){
	int n;
  	int s[10];
  	int k;
  	scanf("%d",&n);
  	s = n;
  
  	for(int i = 0; i < 10; i++)
      k = k + s[i];
  	if(n % s == 0)
      printf("Yes\n");
  	else
      printf("No\n");
  	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:11: error: assignment to expression with array type
    8 |         s = n;
      |           ^
main.c:12:14: error: invalid operands to binary % (have 'int' and 'int *')
   12 |         if(n % s == 0)
      |              ^
      |              |
      |              int *
Language: C++

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


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

#include<iostream>
using namespace std;

int main(){
  int N,s1,s2,s3,ans;
  cin >> N;
  s1=N/100;
  s2=(N%100)/10;
  s3=N-s1*100-s2*10;
  ans=s1+s2+s3;
  if (N%ans==0) cout << "Yes";
  else cout << "No"
}


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

#include<stdio.h>
int main()
{
    int a[10];
    int i=0,n=0,m=0;
    while(scanf("%1d",&a[i]!=EOF)
    {
         n=n*10+a[i];   
         m=m+a[i];  
    }
    if(n%m==0)
    {
              printf("Yes");
    }
    else
    {
        printf("No");
    }
    return 0;   
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:6:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    6 |     while(scanf("%1d",&a[i]!=EOF)
      |                            ^
a.cc:6:34: error: expected ')' before '{' token
    6 |     while(scanf("%1d",&a[i]!=EOF)
      |          ~                       ^
      |                                  )
    7 |     {
      |     ~
Language: Java

package atCoderBeginnerContest101;

import java.util.Scanner;

public class B {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int Sn = 0;
		String NS = String.valueOf(N);
		for(int i = 0;i < NS.length(); i++) {
			Sn += Integer.parseInt(String.valueOf(NS.charAt(i)));
		}
		if(N % Sn == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}

}

Compiler output:
Main.java:5: error: class B is public, should be declared in a file named B.java
public class B {
       ^
1 error
Language: C++

#include <iostream>
#include<algorithm>
#include <vector>
#include<string>
#include<cmath>
#include<cstdio>

using namespace std;

int main() {
	long n;
	cin >> n;
	int ans = s(n);
	if (n%ans == 0) {
		cout << "Yes";
	}
	else {
		cout << "No";
	}
	return 0;
}
int s(long n) {
	int ans = 1;
	while ((n/10)==0)
	{
		ans++;
	}
	return ans;
}

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

N = input()

sumN = sum(list(map(int,list(N))))

if int(N) % sumN == 0:
    print('Yes')
else:
    print('No')


Compiler output:
a.cc:6:11: warning: multi-character character constant [-Wmultichar]
    6 |     print('Yes')
      |           ^~~~~
a.cc:8:11: warning: multi-character character constant [-Wmultichar]
    8 |     print('No')
      |           ^~~~
a.cc:1:1: error: 'N' does not name a type
    1 | N = input()
      | ^
Language: C++

int main() {
	long n;
	cin >> n;
	int ans = s(n);
	if (n%ans == 0) {
		cout << "Yes";
	}
	else {
		cout << "No";
	}
	return 0;
}
int s(long n) {
	int ans = 1;
	while ((n/10)==0)
	{
		ans++;
	}
	return ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'cin' was not declared in this scope
    3 |         cin >> n;
      |         ^~~
a.cc:4:19: error: 's' was not declared in this scope
    4 |         int ans = s(n);
      |                   ^
a.cc:6:17: error: 'cout' was not declared in this scope
    6 |                 cout << "Yes";
      |                 ^~~~
a.cc:9:17: error: 'cout' was not declared in this scope
    9 |                 cout << "No";
      |                 ^~~~
Language: C++

#include <iostream>
using namespace std;
int main (){
  int N;
  cin>>N;
  int num[9],total=0,K;
  K=N;
  for(int i=0;i<9;i++){
    num[i]=N%10;
    N=(N-N%10)/10;
  }
  for(int i=0;i<9;i++){
    total+=num[i];
  }
  if(K%total==0){
    cout<<"Yes"<<endl;
  }elseif(K==1000000000){
    cout<<"Yes"<<endl;
  }else{
    cout<<"No"<<endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:4: error: 'elseif' was not declared in this scope
   17 |   }elseif(K==1000000000){
      |    ^~~~~~
a.cc:19:4: error: 'else' without a previous 'if'
   19 |   }else{
      |    ^~~~
Language: C

#include<stdio.h>

int main()
{
	int n,m,i;
	char ns[20];
	scanf("%d", n);
	snprintf(ns,20,"%d",n)
	for (i = 0; i != NULL; i++)
		m += ns[i];
	if (n / m == 0)
		printf("Yes");
	else
		printf("No");
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:31: error: expected ';' before 'for'
    8 |         snprintf(ns,20,"%d",n)
      |                               ^
      |                               ;
    9 |         for (i = 0; i != NULL; i++)
      |         ~~~
Language: C

#include<stdio.h>

int main()
{
	int n,m,i;
	char ns[20];
	scanf("%d", n);
	snprintf(ns,20,"%d",n)
	for (i = 0; i != \0; i++)
		m += ns[i];
	if (n / m == 0)
		printf("Yes");
	else
		printf("No");
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:31: error: expected ';' before 'for'
    8 |         snprintf(ns,20,"%d",n)
      |                               ^
      |                               ;
    9 |         for (i = 0; i != \0; i++)
      |         ~~~                    
main.c:9:26: error: stray '\' in program
    9 |         for (i = 0; i != \0; i++)
      |                          ^
Language: C++

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int main(void) {
	int a, b, c, d, e, f, g, h, i, N;
	scanf("%d", &N);
	a = N / 100000000;
	b = (N - a * 100000000) / 10000000;
	c = (N - (a * 100000000 + b * 10000000)) / 1000000;
	d = (N - (a * 100000000 + b * 10000000 + c * 1000000)) / 100000;
	e = (N - (a * 100000000 + b * 10000000 + c * 1000000 + d * 100000)) / 10000;
	f = (N - (a * 100000000 + b * 10000000 + c * 1000000 + d * 100000 + e * 10000)) / 1000;
	g = (N - (a * 100000000 + b * 10000000 + c * 1000000 + d * 100000 + e * 10000 + f * 1000 )) / 100;
	h = (N - (a * 100000000 + b * 10000000 + c * 1000000 + d * 100000 + e * 10000 + f * 1000 + g * 100)) / 10;
	i = N - (a * 100000000 + b * 10000000 + c * 1000000 + d * 100000 + e * 10000 + f * 1000 + g*100 + h*10);

	if (N % (a* 100000000 + b* 10000000 + c* 1000000 + d* 100000 + e* 10000 + f* 1000 + g*100 + h*10 + i) == 0) {
		printf("Yes\n");
	}else {
		printf("No\n");
	}
}
　　

Compiler output:
a.cc:23:1: error: extended character 　 is not valid in an identifier
   23 | 　　
      | ^
a.cc:23:1: error: extended character 　 is not valid in an identifier
a.cc:23:1: error: '\U00003000\U00003000' does not name a type
   23 | 　　
      | ^~~~
Language: C++

#include<iostream>
using namespace std;

int keta(int n) {
	int i = 1;
	while (n / 10 > 0) {
		i++;
		n /= 10;
	}
	return i;
}

int S(int n) {
	int i;
	int sum = 0;
	for (i = 0;i < keta(n);i++) {
		sum += (n / (int)pow((double)10, (double)i)) % 10;
	}
	return sum;
}

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


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:22: error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   10 |         count += stoi(n[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<stdio.h>

int main()
{
	int n,m,i;
	char ns[20];
	scanf("%s", ns);
	m=int(ns)
	for (i = 0; i != \0; i++)
		n = ns[i];
	if (m / n == 0)
		printf("Yes");
	else
		printf("No");
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:11: error: expected expression before 'int'
    8 |         m=int(ns)
      |           ^~~
main.c:9:26: error: stray '\' in program
    9 |         for (i = 0; i != \0; i++)
      |                          ^
Language: C++

#include <cstdio>
#include <iostream>
#include <cstring>
#include <cstdlib>
#include <algorithm>
using namespace std;

int main()
{
    char str[20];
    while(gets(str)!=NULL)
    {
        int res=0;
        int num=0;
        for(int i=0;str[i]!='\0';i++)
        {
            num*=10;
            num+=str[i]-'0';
            res+=str[i]-'0';
        }
        if(num%res==0)
            printf("Yes\n");
        else
            printf("No\n");
    }
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: 'gets' was not declared in this scope; did you mean 'getw'?
   11 |     while(gets(str)!=NULL)
      |           ^~~~
      |           getw
Language: C++

//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long ll;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

int main() {
    /*
    int N, K;
    cin >> N >> K;

    if((N - 1) % (K - 1) == 0) cout << (N -1) / (K-1);
    else cout << (N - 1) / (K - 1) + 1;
    */
    int N;
    cin >> N;
    int t_N;
    int sum = 0;
    t_N = N;
    while( t_N > 0) {
        sum += t_N % 10;
        t_N /= 10;
    }
    if(N % sum == 0) cout << "Yes";
    else cout << "No";
    */
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:91:6: error: expected primary-expression before '/' token
   91 |     */
      |      ^
a.cc:92:5: error: expected primary-expression before 'return'
   92 |     return 0;
      |     ^~~~~~
Language: C++

#include<iostream>
using namespace std;

int keta(int n) {
	int i = 1;
	while (n / 10 > 0) {
		i++;
		n /= 10;
	}
	return i;
}

int S(int n) {
	int i;
	int sum = 0;
	for (i = 0;i < keta(n);i++) {
		sum += (n / (int)pow((double)10, (double)i)) % 10;
	}
	return sum;
}

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

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

#include<stdio.h>

int main()
{
	int n,m,i;
	char ns[20];
	scanf("%s", ns);
	m=int(ns)
	for (i = 0; i != \0; i++)
		n = ns[i];
	if (m / n == 0)
		printf("Yes");
	else
		printf("No");
	return 0;
}

Compiler output:
a.cc:9:26: error: stray '\' in program
    9 |         for (i = 0; i != \0; i++)
      |                          ^
a.cc: In function 'int main()':
a.cc:8:11: error: cast from 'char*' to 'int' loses precision [-fpermissive]
    8 |         m=int(ns)
      |           ^~~~~~~
a.cc:8:18: error: expected ';' before 'for'
    8 |         m=int(ns)
      |                  ^
      |                  ;
    9 |         for (i = 0; i != \0; i++)
      |         ~~~       
a.cc:9:33: error: expected ';' before ')' token
    9 |         for (i = 0; i != \0; i++)
      |                                 ^
      |                                 ;
Language: C

#include <stdio.h>
int main(void)
{
  int N,i,num;
  i=0;

  scanf("%d",&N);
  num=N;
  while(num<0){

    i=num%10+i;
    if(num<10){
      num=-1
    }
    num=num/10;
  }
  if((N%i)==0){
    printf("Yes");
  }else{
    printf("No");
  }
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:13:13: error: expected ';' before '}' token
   13 |       num=-1
      |             ^
      |             ;
   14 |     }
      |     ~
Language: C++

#include <iostream>
int main(){
   long int a, S = 0;
	long int m = 10;

	std::cin >> a;
	while(a/m != 0){
		S += a%10;
		a/=10;
	}
	S += a%10;

	if(a%s == 0){
		std::cout << "Yes";
	}
	else{
		std::cout << "No";
	}
   return 0;
}

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

#include <stdio.h>
int main(void)
{
  int N,i,num;
  i=0;

  scanf("%d",&N);
  num=N;
  while(num<0){

    i=num%10+i;
    if(num<10){
      num=-1
    }
    num=num/10;
  }
  if((N%i)==0){
    printf('Yes');
  }else{
    printf('No');
  }
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:13:13: error: expected ';' before '}' token
   13 |       num=-1
      |             ^
      |             ;
   14 |     }
      |     ~        
main.c:18:12: warning: multi-character character constant [-Wmultichar]
   18 |     printf('Yes');
      |            ^~~~~
main.c:18:12: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
   18 |     printf('Yes');
      |            ^~~~~
      |            |
      |            int
In file included from main.c:1:
/usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'int'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:20:12: warning: multi-character character constant [-Wmultichar]
   20 |     printf('No');
      |            ^~~~
main.c:20:12: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
   20 |     printf('No');
      |            ^~~~
      |            |
      |            int
/usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'int'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C

#include<stdio.h>
#include<stdlib.h>
int main(){
int i;
char s[1000000001];
scanf("%s",s);
int num=atoi(s);
int sum=0;
while(i=0;s[i]!='\0';i++){
  sum+=s[i]-'0';
}
if(num%sum==0) printf("Yes");
else printf("No");

return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:10: error: expected ')' before ';' token
    9 | while(i=0;s[i]!='\0';i++){
      |      ~   ^
      |          )
Language: C

#include<stdio.h>
#include<math.h>

int digsum(n){
  int array[10],i,ans;
  for(i=9;i>=0;i--){
    array[i] = n / pow(10,i);
    n = n % pow(10,i);
    sum += array[i]
  }
  return ans;
}

int main(){
  int N,S;
  scanf("%d",&N);
  S = digsum(N);
  if(N%S==0) printf("Yes");
  else printf("No");
  return 0;
}

Compiler output:
main.c: In function 'digsum':
main.c:4:5: error: type of 'n' defaults to 'int' [-Wimplicit-int]
    4 | int digsum(n){
      |     ^~~~~~
main.c:8:11: error: invalid operands to binary % (have 'int' and 'double')
    8 |     n = n % pow(10,i);
      |           ^ ~~~~~~~~~
      |             |
      |             double
main.c:9:5: error: 'sum' undeclared (first use in this function)
    9 |     sum += array[i]
      |     ^~~
main.c:9:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:20: error: expected ';' before '}' token
    9 |     sum += array[i]
      |                    ^
      |                    ;
   10 |   }
      |   ~
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
 
public class Main {
 
	public static void main(String[] args) throws Throwable {
		BufferedReader vd = new BufferedReader(new InputStreamReader(System.in));
    String cd= vd.readLine();
    String[] s = cd.split("");
    int sum =0;
    for(int i=0;i<s.length;i++){
      sum=sum+Integer.parseInt(s[i]);
    }
    int p = Integer.parseInt(cd);
    if(p%sum==0)System.out.pringln ("Yes");
    if(p%sum!=0)System.out.pringln ("No");
  }
}

Compiler output:
Main.java:15: error: cannot find symbol
    if(p%sum==0)System.out.pringln ("Yes");
                          ^
  symbol:   method pringln(String)
  location: variable out of type PrintStream
Main.java:16: error: cannot find symbol
    if(p%sum!=0)System.out.pringln ("No");
                          ^
  symbol:   method pringln(String)
  location: variable out of type PrintStream
2 errors
Language: Java

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		int x = 0;
		for (int i = 0; i< args[0].length(); i++){
			x += (args[0].charAt(i) - '0');
		}
		
		int y = Integer.parseInt(args[0]);
		
		if ( y%x == 0 ) {
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	}


Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
	public static void main(String[] args) {
	              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: C++

#include<iostream>
using namespace std;
int main(){
  int n,x;
  cin>>n;
  x=-9(n/1000000000+n/100000000+n/10000000+n/1000000+n/100000+n/10000+n/1000+n/100+n/10)+n;
  if(x%n==0)cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: expression cannot be used as a function
    6 |   x=-9(n/1000000000+n/100000000+n/10000000+n/1000000+n/100000+n/10000+n/1000+n/100+n/10)+n;
      |      ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

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

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

      

Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: expected ';' before ':' token
   11 |       n/=10 :
      |            ^~
      |            ;
Language: Java

import java.util.Scanner;

public class Problem2 {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int num = in.nextInt();
		int numOrigin = num;
		int sumEachDigit = 0;
		while(num>0) {
			sumEachDigit += num % 10;
			num /= 10;
		}
		if(numOrigin%sumEachDigit==0) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}

	}

}


Compiler output:
Main.java:3: error: class Problem2 is public, should be declared in a file named Problem2.java
public class Problem2 {
       ^
1 error
Language: C++

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

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

      

Compiler output:
a.cc:13:29: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   13 |     if ( m%sum==0 ) cout << ' Yes ' << endl ;
      |                             ^~~~~~~
a.cc:14:18: warning: multi-character character constant [-Wmultichar]
   14 |     else cout << ' No ' << endl ;
      |                  ^~~~~~
a.cc: In function 'int main()':
a.cc:11:12: error: expected ';' before ':' token
   11 |       n/=10 :
      |            ^~
      |            ;
Language: C++

#include<iostream>
using namespace std;

int main(){
  int N,ans;
  cin>>N;
  for(;;){
    ans=ans+(N%10)
    int s=N-(N%10);
    N=s/10;
    if(N==0)
      break;
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: expected ';' before 'int'
    8 |     ans=ans+(N%10)
      |                   ^
      |                   ;
    9 |     int s=N-(N%10);
      |     ~~~            
a.cc:10:7: error: 's' was not declared in this scope
   10 |     N=s/10;
      |       ^
Language: C++

#include<iostream>
#include<vector>

using namespace std;

int mian(){
  long n,m,a,b,c;
  char N,M,A,B,C;
  c= 0;
  cin >>  a;
  b= 1;
  for(int i =0 ; i < 9; i++){
    c+= int(a/b)%10;
    b*= 10;
  }

  if(a%c) cout << "No"<< endl;
  else cout << "Yes" << endl;
}


Compiler output:
a.cc: In function 'int mian()':
a.cc:19:1: warning: no return statement in function returning non-void [-Wreturn-type]
   19 | }
      | ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status