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

#include<iostream>
 
using namespace std;
 
int main(){
    char S[5];
    scanf("%s", S);
    int sum=0;
    for(int i=0; i<4; i++){
        if(S[i]=='-')sum--;
        else sum++;
    }
    printf("%d\n", sum);
    return 0;

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

#include<iostream>
using namespace std;
int main ()
{
int num ;
cin>>num ;
if  (num >0) 
{
cout <<"1"<<endl ;
}
else  cout <<"0"<<endl ;
return 0;

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

#include<iostream>
using namespace std;
int main ()
{
int num ;
cin>>num ;
if  (num > =0) 
{
cout <<"1"<<endl ;
}
else  cout <<"0"<<endl ;
return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: expected primary-expression before '=' token
    7 | if  (num > =0)
      |            ^
Language: C++

#include<iostream>
using namespace std;
int main ()
{
int num ;
cin>>num ;
if  (num > =0) 
{
cout <<"1"<<endl ;
}
else  cout <<" 0 "<,endl ;
return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: expected primary-expression before '=' token
    7 | if  (num > =0)
      |            ^
a.cc:11:20: error: expected primary-expression before ',' token
   11 | else  cout <<" 0 "<,endl ;
      |                    ^
Language: C++

#include<iostream>
using namespace std;
int main ()
{
int num ;
cin>>num ;
if  (num > =0) 
{
cout <<"1"<<endl;
}
else  cout <<" 0"<,endl;
return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: expected primary-expression before '=' token
    7 | if  (num > =0)
      |            ^
a.cc:11:19: error: expected primary-expression before ',' token
   11 | else  cout <<" 0"<,endl;
      |                   ^
Language: C++

#include<iostream>
using namespace std;
int main ()
{
int num ;
cin>>num ;
if   { (num > =0) cout <<"1"<<endl;
}
else ( num <0 ) cout <<" 0"<,endl;
return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: expected '(' before '{' token
    7 | if   { (num > =0) cout <<"1"<<endl;
      |      ^
      |      (
a.cc:9:1: error: 'else' without a previous 'if'
    9 | else ( num <0 ) cout <<" 0"<,endl;
      | ^~~~
a.cc:9:16: error: expected ';' before 'cout'
    9 | else ( num <0 ) cout <<" 0"<,endl;
      |                ^~~~~
      |                ;
Language: C++

#include<iostream>
using namespace std;
int main ()
{
int num ;
cin>>num ;
if  (num > =0) cout <<"1"<<endl;
else ( num <0 ) cout <<" 0"<,endl;
return 0;
} 


Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: expected primary-expression before '=' token
    7 | if  (num > =0) cout <<"1"<<endl;
      |            ^
a.cc:8:16: error: expected ';' before 'cout'
    8 | else ( num <0 ) cout <<" 0"<,endl;
      |                ^~~~~
      |                ;
Language: C++

#include<iostream>
 
using namespace std;

int main(){
  char s[5];
  scanf("%s",S);
  int sum=0;
  for(int i=0; i<4; i++){
if (s[i]=='-')sum--;
else sum++;
}
printf("%d\n",sum);
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: 'S' was not declared in this scope
    7 |   scanf("%s",S);
      |              ^
Language: C

#include<iostream>
 
using namespace std;
 
int main(){
    char S[5];
    scanf("%s", S);
    int sum=0;
    for(int i=0; i<4; i++){
        if(S[i]=='-')sum--;
        else sum++;
    }
    printf("%d\n", sum);
    return 0;
}
 

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

#include<iostream>
#include<string>
using namespace std;
int  main()
{ string s;
 cin>>s;
 int c1=0;
 for(int i=0;i<s.length();i++)
 {  if(s[i]=='+)
         c1++;
     else
         c1--;
 }
       cout<<c1;
     
}

Compiler output:
a.cc:9:14: warning: missing terminating ' character
    9 |  {  if(s[i]=='+)
      |              ^
a.cc:9:14: error: missing terminating ' character
    9 |  {  if(s[i]=='+)
      |              ^~~
a.cc: In function 'int main()':
a.cc:11:6: error: expected primary-expression before 'else'
   11 |      else
      |      ^~~~
a.cc:10:15: error: expected ')' before 'else'
   10 |          c1++;
      |               ^
      |               )
   11 |      else
      |      ~~~~      
a.cc:9:7: note: to match this '('
    9 |  {  if(s[i]=='+)
      |       ^
Language: C++

#include <bits/stdc++.h>
//#include <atcoder/all>
#define ll long long int
#define MOD 1000000007
#define P pair<ll,ll>
#define INF 1000000000000000000

//using namespace atcoder;
using namespace std;

int main(void){
  string s;
  cin >> s;
  
  ll a = 0;
  for (int i = 0; i < 4; i++){
    if (s[i] == '+')
      s++;
    else
      s--;
  }
  cout << s << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:8: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
   18 |       s++;
      |       ~^~
a.cc:20:8: error: no 'operator--(int)' declared for postfix '--' [-fpermissive]
   20 |       s--;
      |       ~^~
Language: C++

#include <iostream>
using namespace std;
int main()
{
	int sum = 0;
	string s;
	cin >> s;
	for(int i = 0; i < s.size(); i++
	{
		if( s[i] == '-' )
			sum--;
		else sum++;
	}
	cout << sum;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:41: error: expected ')' before '{' token
    8 |         for(int i = 0; i < s.size(); i++
      |            ~                            ^
      |                                         )
    9 |         {
      |         ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    string str;
    cin>>str;
    int s=0;
    for(int i=0;i<str.length();i++)
    {
        if(s[i]=='+')
        s++;
        else
        s--;
    }
    cout<<s<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: invalid types 'int[int]' for array subscript
   10 |         if(s[i]=='+')
      |             ^
Language: C++

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

int main()
{
  string s;
  int ans=0;
  cin>>s;
  for(int i=0;i<4;i++)
  {
    if(s.at(i)=="+")
      ans++;
    else
      ans--;
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |     if(s.at(i)=="+")
      |        ~~~~~~~^~~~~
Language: C

#include<stdio.h>
#include<string.h>
int main(){
  char a[10];
  int i,k=0;
  scanf("%s", &a[10]);
  char *c=a[];
  for(i=0;i<strlen(a);i++){
    if(c[i]=='+')
      k++;
    else
      k--;
  }
  printf("%d",k);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:13: error: expected expression before ']' token
    7 |   char *c=a[];
      |             ^
Language: C

#include<stdio.h>
#include<string.h>
int main(){
  char *a[];
  int i,k=0;
  scanf("%s", &a[10]);
  for(i=0;i<strlen(a);i++){
    if(a[i]=='+')
      k++;
    else
      k--;
  }
  printf("%d",k);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:9: error: array size missing in 'a'
    4 |   char *a[];
      |         ^
main.c:7:20: error: passing argument 1 of 'strlen' from incompatible pointer type [-Wincompatible-pointer-types]
    7 |   for(i=0;i<strlen(a);i++){
      |                    ^
      |                    |
      |                    char **
In file included from main.c:2:
/usr/include/string.h:407:35: note: expected 'const char *' but argument is of type 'char **'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
main.c:8:12: warning: comparison between pointer and integer
    8 |     if(a[i]=='+')
      |            ^~
Language: C

#include<stdio.h>
#include<string.h>
int main(){
  char a[10];
  int i,k=0;
  scanf("%s", &a[10]);
  for(i=0;i<strlen(a);i++){
    if(char* a[i]=='+')
      k++;
    else
      k--;
  }
  printf("%d",k);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:8: error: expected expression before 'char'
    8 |     if(char* a[i]=='+')
      |        ^~~~
Language: C

#include<stdio.h>
#include<string.h>
int main(void)
{
	int a,i;
	char S[5];
	scanf("%s",S);
		for(i=0;i<strlen(S);++i){
			if(s[i]=='+') a++;
			else a--;
		}
		printf("%d\n",a);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:28: error: 's' undeclared (first use in this function)
    9 |                         if(s[i]=='+') a++;
      |                            ^
main.c:9:28: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<string.h>
int main(void)
{
	int a,i;
	char S[5];
	scanf("%s",S);
		for(i=0;i<strlen(S);i++){
			if(s[i]=='+') a++;
			else a--;
		}
		printf("%d\n",a);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:28: error: 's' undeclared (first use in this function)
    9 |                         if(s[i]=='+') a++;
      |                            ^
main.c:9:28: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<string.h>
int main(void)
{
	int a,i;
	char S[5];
	scanf("%s",S);
		for(i=0;i<strlen(s);i++){
			if(s[i]=='+') a++;
			else a--;
		}
		printf("%d\n",a);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:34: error: 's' undeclared (first use in this function)
    8 |                 for(i=0;i<strlen(s);i++){
      |                                  ^
main.c:8:34: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<string.h>
int main(void)
{
	int a,i;
	char S[5];
	scanf("%s",S);
		for(i=0;i<strlen(S);i++){
			if(s[i]=='+') a++;
			else a--;
		}
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:28: error: 's' undeclared (first use in this function)
    9 |                         if(s[i]=='+') a++;
      |                            ^
main.c:9:28: 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 a[10];
  int i;
  scanf("%s", &a[]);
  
  int k=0;
  for(i=0;i<strlen(a);i++){
    if(a[i]=="+")
      k++;
    else if(a[i]=="-")
      k--;
  }
  printf("%d",k);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:18: error: expected expression before ']' token
    6 |   scanf("%s", &a[]);
      |                  ^
main.c:10:12: warning: comparison between pointer and integer
   10 |     if(a[i]=="+")
      |            ^~
main.c:12:17: warning: comparison between pointer and integer
   12 |     else if(a[i]=="-")
      |                 ^~
Language: C

#include<stdio.h>
int main(){
  const char a[10];
  int i;
  scanf("%s", &a[]);
  
  int k=0;
  for(i=0;i<strlen(a);i++){
    if(a[i]=="+")
      k++;
    else if(a[i]=="-")
      k--;
  }
  printf("%d",k);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:5:18: error: expected expression before ']' token
    5 |   scanf("%s", &a[]);
      |                  ^
main.c:8:13: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    8 |   for(i=0;i<strlen(a);i++){
      |             ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen'
    1 | #include<stdio.h>
  +++ |+#include <string.h>
    2 | int main(){
main.c:8:13: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    8 |   for(i=0;i<strlen(a);i++){
      |             ^~~~~~
main.c:8:13: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:9:12: warning: comparison between pointer and integer
    9 |     if(a[i]=="+")
      |            ^~
main.c:11:17: warning: comparison between pointer and integer
   11 |     else if(a[i]=="-")
      |                 ^~
Language: C

#include<stdio.h>
int main(){
  char a[10];
  int i;
  scanf("%s", &a[]);
  
  int k=0;
  for(i=0;i<strlen(a);i++){
    if(a[i]=="+")
      k++;
    else if(a[i]=="-")
      k--;
  }
  printf("%d",k);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:5:18: error: expected expression before ']' token
    5 |   scanf("%s", &a[]);
      |                  ^
main.c:8:13: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    8 |   for(i=0;i<strlen(a);i++){
      |             ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen'
    1 | #include<stdio.h>
  +++ |+#include <string.h>
    2 | int main(){
main.c:8:13: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    8 |   for(i=0;i<strlen(a);i++){
      |             ^~~~~~
main.c:8:13: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:9:12: warning: comparison between pointer and integer
    9 |     if(a[i]=="+")
      |            ^~
main.c:11:17: warning: comparison between pointer and integer
   11 |     else if(a[i]=="-")
      |                 ^~
Language: C

#include<stdio.h>
int main(){
  char a[];
  int i;
  scanf("%s", &a[]);
  
  int k=0;
  for(i=0;i<strlen(a);i++){
    if(a[i]=="+")
      k++;
    else if(a[i]=="-")
      k--;
  }
  printf("%d",k);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:8: error: array size missing in 'a'
    3 |   char a[];
      |        ^
main.c:5:18: error: expected expression before ']' token
    5 |   scanf("%s", &a[]);
      |                  ^
main.c:8:13: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    8 |   for(i=0;i<strlen(a);i++){
      |             ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen'
    1 | #include<stdio.h>
  +++ |+#include <string.h>
    2 | int main(){
main.c:8:13: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    8 |   for(i=0;i<strlen(a);i++){
      |             ^~~~~~
main.c:8:13: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:9:12: warning: comparison between pointer and integer
    9 |     if(a[i]=="+")
      |            ^~
main.c:11:17: warning: comparison between pointer and integer
   11 |     else if(a[i]=="-")
      |                 ^~
Language: C++

#include<iostream>
using namespace std;
int mian(){
  string a;
  cin>>a;
  int k=0;
  for(int i=0;i<a.size();i++){
    if(a.at(i)=='+')
      k++;
    else
      k--;
  }
  cout<<k;
  return 0;
}

Compiler output:
/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
Language: C

#include<stdio.h>
#include<string.h>
int main(){
  char a;
  scanf("%s", &a);
  
  int i,k=0;
  int h=strlen(a);
  for(i=0;i<h;i++){
    if(a[i]=="+")
      k++;
    else if(a[i]=="-")
      k--;
  }
   
  printf("%d",k);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:16: error: passing argument 1 of 'strlen' makes pointer from integer without a cast [-Wint-conversion]
    8 |   int h=strlen(a);
      |                ^
      |                |
      |                char
In file included from main.c:2:
/usr/include/string.h:407:35: note: expected 'const char *' but argument is of type 'char'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
main.c:10:9: error: subscripted value is neither array nor pointer nor vector
   10 |     if(a[i]=="+")
      |         ^
main.c:12:14: error: subscripted value is neither array nor pointer nor vector
   12 |     else if(a[i]=="-")
      |              ^
Language: C

#include<stdio.h>
#include<string.h>
int main(){
  char a;
  scanf("%s", &a);
  
  int i,k=0;
  for(i=0;i<strlen(a);i++){
    if(a[i]=="+")
      k++;
    else if(a[i]=="-")
      k--;
  }
   
  printf("%d",k);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:20: error: passing argument 1 of 'strlen' makes pointer from integer without a cast [-Wint-conversion]
    8 |   for(i=0;i<strlen(a);i++){
      |                    ^
      |                    |
      |                    char
In file included from main.c:2:
/usr/include/string.h:407:35: note: expected 'const char *' but argument is of type 'char'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
main.c:9:9: error: subscripted value is neither array nor pointer nor vector
    9 |     if(a[i]=="+")
      |         ^
main.c:11:14: error: subscripted value is neither array nor pointer nor vector
   11 |     else if(a[i]=="-")
      |              ^
Language: C

#include<stdio.h>
#include<string.h>
int main(){
  char a;
  scanf("%s", &a);
  
  int i,k=0;
  for(i=0;i<strlen(a);i++){
    if(a[i]=="+")
      k++;
    else if(a[i]=="-")
      k--;
  }
   
  printf("%d",k);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:20: error: passing argument 1 of 'strlen' makes pointer from integer without a cast [-Wint-conversion]
    8 |   for(i=0;i<strlen(a);i++){
      |                    ^
      |                    |
      |                    char
In file included from main.c:2:
/usr/include/string.h:407:35: note: expected 'const char *' but argument is of type 'char'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
main.c:9:9: error: subscripted value is neither array nor pointer nor vector
    9 |     if(a[i]=="+")
      |         ^
main.c:11:14: error: subscripted value is neither array nor pointer nor vector
   11 |     else if(a[i]=="-")
      |              ^
Language: C

#include<stdio.h>
int main(){
  char a;
  scanf("%s", &a);
  int i;
  int k=0;
  for(i=0;i<4;i++){
    if(a.at(i)=="-")
      k--;
    else if(a.at(i)=="+")
      k++;
  }
  printf("%d",k);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:9: error: request for member 'at' in something not a structure or union
    8 |     if(a.at(i)=="-")
      |         ^
main.c:10:14: error: request for member 'at' in something not a structure or union
   10 |     else if(a.at(i)=="+")
      |              ^
Language: C

#include<stdio.h>
int main(){
  char a;
  scanf("%s", &a);
  int i;
  int k=0;
  for(i=0;i<4;i++){
    if(a.at(i)=='-')
      k--;
    else if(a.at(i)=='+')
      k++;
  }
  printf("%d",k);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:9: error: request for member 'at' in something not a structure or union
    8 |     if(a.at(i)=='-')
      |         ^
main.c:10:14: error: request for member 'at' in something not a structure or union
   10 |     else if(a.at(i)=='+')
      |              ^
Language: C

#include<stdio.h>
int main(){
  char a;
  scanf("%d", &a);
  int i;
  int k=0;
  for(i=0;i<4;i++){
    if(a.at(i)=='-')
      k--;
    else if(a.at(i)=='+')
      k++;
  }
  printf("%d",k);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:9: error: request for member 'at' in something not a structure or union
    8 |     if(a.at(i)=='-')
      |         ^
main.c:10:14: error: request for member 'at' in something not a structure or union
   10 |     else if(a.at(i)=='+')
      |              ^
Language: C++

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

int main(){
  string a;
  cin >> a;
  int b=0,c=0;
  for(int i=0;i<4;i++){
    if(a.at(i)=='+')b++
    else c++;
  }
  cout << b-c;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:24: error: expected ';' before 'else'
   11 |     if(a.at(i)=='+')b++
      |                        ^
      |                        ;
   12 |     else c++;
      |     ~~~~
Language: C

#include<stdio.h>
#include<string.h>
int main(void)
{
	int a,i;
	char S,x;
	scanf("%s",&S);
		for(i=0;i<=4;i++){
			S=x[4];
		}
	for(i=0;i<=4;i++){
	printf("%c\n",x[4][i]);
	}
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:28: error: subscripted value is neither array nor pointer nor vector
    9 |                         S=x[4];
      |                            ^
main.c:12:24: error: subscripted value is neither array nor pointer nor vector
   12 |         printf("%c\n",x[4][i]);
      |                        ^
Language: C

#include<stdio.h>
#include<string.h>
int main(void)
{
	int a,i;
	char S[4],x[4][];
	scanf("%s",&S);
		for(i=0;i<=4;i++){
			S[4]=x[4][i];
		}
	for(i=0;i<=4;i++){
	printf("%c\n",x[4][i]);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:19: error: array type has incomplete element type 'char[]'
    6 |         char S[4],x[4][];
      |                   ^
main.c:6:19: note: declaration of 'x' as multidimensional array must have bounds for all dimensions except the first
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string S;
  int j;
  j=0
  for(int i=0;i<4;i++){
    if(S.at(i)='+'){
    j++;
    }
    else{
    j--;
    }
  }
  cout << j << endl;
}

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

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

int main(){
    /*
    string a;
    int b = 0;
    cin >> a;
    for(int i =0; i<4; i++){
        if(a[i] == '+'){
            ++b;
        }else{
            --b;
        }
    }
    cout << b << endl;
    */
   string s; cin >> s;
   int sum=0;
   rep(i,4){
       if(s[i] == "+"){
           ++sum;
       }else{
           --sum;
       }
   }
   cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   22 |        if(s[i] == "+"){
Language: C++

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

int main() {
  int ans=0;
  strin S;
  cin >> S;
  for(int i=0; i<4; i++){
    if(S.at(i)=='+')ans ++;
    else ans --;
  }
  
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'strin' was not declared in this scope; did you mean 'stdin'?
    6 |   strin S;
      |   ^~~~~
      |   stdin
a.cc:7:10: error: 'S' was not declared in this scope
    7 |   cin >> S;
      |          ^
Language: C++

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

int main() {
    string s;
    cin >> s;
	int ans = 0;
  	for(int i = 0; i < s.length(); i++) {
      if(s[i] == '+') ans++;
      else ans--; //条件より'+'でなければ'-'なので引く
    }
  
  print(ans);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: 'print' was not declared in this scope; did you mean 'rint'?
   13 |   print(ans);
      |   ^~~~~
      |   rint
Language: C++

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

int main() {
    string s;
    cin >> s;
    cout << count(all(s), '+') - count(all(s), '-') << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: 'all' was not declared in this scope; did you mean 'std::filesystem::perms::all'?
    7 |     cout << count(all(s), '+') - count(all(s), '-') << endl;
      |                   ^~~
      |                   std::filesystem::perms::all
In file included from /usr/include/c++/14/filesystem:51,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200,
                 from a.cc:1:
/usr/include/c++/14/bits/fs_fwd.h:158:7: note: 'std::filesystem::perms::all' declared here
  158 |       all               =  0777,
      |       ^~~
Language: C++

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

int main() {
  string s ;
  cin >> s ;
  int count = 0 ;
  for ( int i=0 ; i<4 ; i++){
    if (s.at(i)=="+") count ++ ;
  else count -- ;
  }
  cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |     if (s.at(i)=="+") count ++ ;
      |         ~~~~~~~^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  string A;
  cin >> A;
  int ans = 0;
  for(int i = 0; i < 4; i++) {
    if(A.(i) = '+') {
      ans++;
    }
    else {
      ans--;
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: expected unqualified-id before '(' token
    8 |     if(A.(i) = '+') {
      |          ^
Language: C

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

#define gcd(a,b)		__gcd(a,b)
#define lcm(a,b)		(a*b)/gcd(a,b)
#define ff              first
#define ss              second
#define int             long long
#define pb              emplace_back
#define mp              make_pair
#define pii             pair<int,int>
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define mod             1000000007
#define inf             INT64_MAX
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define w(x)            int x; cin>>x; while(x--)
#define all(x)			x.begin(),x.end()
#define digits(x)		floor(log10(x))+1
#define FIO				ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)

class dsu {
private:
	int *id;
	int* sz;

	int root(int i) {
		while (i != id[i]) {
			id[i] = id[id[i]];
			i = id[i];
		}
		return i;
	}
public:
	int n;
	dsu(int v) {
		n = v;
		id = new int[n];
		sz = new int[n];

		for (int i = 0; i < n; i++) {
			id[i] = i;
			sz[i] = 0;
		}
	}

	bool find(int p , int q) {
		return root(p) == root(q);
	}

	void join(int p , int q) {
		int i = root(p);
		int j = root(q);
		if (i == j) {
			return;
		}
		if (sz[i] < sz[j]) {
			id[i] = j ;
			sz[j] += sz[i];
		}
		else {
			id[j] = i;
			sz[i] += sz[j];
		}
	}
};

class BIT {
private:
	int* FT;
	int n;
public:
	void updateBIT(int index , int val) {
		index += 1;
		while (index <= n) {
			FT[index] += val;
			index += (index & (-index));
		}
	}

	int getSum(int index) {
		index += 1;
		int sum = 0 ;
		while (index > 0) {
			sum += FT[index];
			index -= (index & (-index));
		}
		return sum;
	}


	BIT(int* a , int v) {
		n = v ;
		FT = new int[n + 1];
		for (int i = 1 ; i <= n ; i++) {
			FT[i] = 0 ;
		}
		for (int i = 0 ; i < n ; i++) {
			updateBIT(i, a[i]);
		}
	}
};

int nCr(int n , int r ) {
	int p = 1, k = 1;

	if (n - r < r ) {
		r = n - r;
	}
	if (r != 0) {
		while (r != 0) {
			p *= n ;
			k *= r ;
			int m = __gcd(p, k);
			p /= m;
			k /= m;
			n--;
			r--;
		}
	}
	else {
		p = 1;
	}
	return p ;
}

int modPower(int x, int y , int p) {
	//Used to calculate (x^y)%p
	int res = 1;
	if (y == 0) {
		return 1;
	}

	x = x % p;
	if (x == 0) {
		return 0  ;
	}

	while (y > 0) {
		if (y & 1) {
			res = (res * x) % p;
		}

		y >>= 1;
		x = (x * x) % p;
	}
	return res ;

}

int32_t main() {
	FIO;



	int ans = 0 ; 
	string s ; 
	cin>>s;
	for(int i = 0 ; i<s.length() ; i++){
		if(s[i]=='+'){
			ans++;
		}
		else{
			ans--;
		}
	}
	cout<<ans;







	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: Java

import java.util.*;

public class Main {
  
  public static void main(String[] args) {
    
    Scanner scan = new Scanner(System.in);
    int x = 0;
    String str = scan.next();
    String plus = "+";
    String minus = "-";
    
    for (int i = 0; i <= 4; i++) {
      char ch = str.charAt(i);
      
      if (ch.equals(plus)) {
        x = x + 1;
      }
      
      if (ch.equals(minus)) {
        x = x - 1;
      }
    }
    
    System.out.println(0);
  }
}


Compiler output:
Main.java:16: error: char cannot be dereferenced
      if (ch.equals(plus)) {
            ^
Main.java:20: error: char cannot be dereferenced
      if (ch.equals(minus)) {
            ^
2 errors
Language: Java

import java.util.*;

public class Main {
  
  public static void main(String[] args) {
    
    Scanner scan = new Scanner(System.in);
    int x = 0;
    String plus = "+";
    String minus = "-";
    
    for (int i = 0; i <= 4; i++) {
      String y = scan.nextString();
      
      if (y.equals(plus)) {
        x = x + 1;
      }
      
      if (y.equals(minus)) {
        x = x - 1;
      }
    }
    
    System.out.println(x);
  }
}


Compiler output:
Main.java:13: error: cannot find symbol
      String y = scan.nextString();
                     ^
  symbol:   method nextString()
  location: variable scan of type Scanner
1 error
Language: Java

import java.util.*;

public class Main {
  
  public static void main(String[] args) {
    
    Scanner scan = new Scanner(System.in);
    int x = 0;
    
    for (i = 0; i <= 4; i++) {
      String y = scan.nextString();
      
      if (y = "+") {
        x = x + 1;
      }
      
      if (y = "-") {
        x = x - 1;
      }
    }
    
    System.out.println(x);
  }
}


Compiler output:
Main.java:10: error: cannot find symbol
    for (i = 0; i <= 4; i++) {
         ^
  symbol:   variable i
  location: class Main
Main.java:10: error: cannot find symbol
    for (i = 0; i <= 4; i++) {
                ^
  symbol:   variable i
  location: class Main
Main.java:10: error: cannot find symbol
    for (i = 0; i <= 4; i++) {
                        ^
  symbol:   variable i
  location: class Main
Main.java:11: error: cannot find symbol
      String y = scan.nextString();
                     ^
  symbol:   method nextString()
  location: variable scan of type Scanner
Main.java:13: error: incompatible types: String cannot be converted to boolean
      if (y = "+") {
            ^
Main.java:17: error: incompatible types: String cannot be converted to boolean
      if (y = "-") {
            ^
6 errors
Language: Java

import java.util.*;

public class Main {
  
  public static void main(String[] args) {
    
    Scanner scan = new Scanner(System.in);
    int x = 0;
    
    for (i = 0; i <= 4; i++) {
      String y = scan.nextString();
      
      if (y = "+") {
        x = x + 1;
      }
      
      if (y = "-") {
        x = x - 1'
      }
    }
    
    System.out.println(x);
  }
}

Compiler output:
Main.java:18: error: illegal line end in character literal
        x = x - 1'
                 ^
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
string str;
cin>>str;
long long num = 0;
for(int i=0;I<str.length();i++)
{
if(str[i] == '+')
{
num++;
}
else
{
num--;
}
}
cout<<num<<endl;
}

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

#include <bits/stdc++.h>
using namespace std;
int main(){
string S;
cin>>S;
int count=0;
for(int i=0; i<$; i++){
    if(S.at(i)=='+'){
        count++;
    }
    else
    {
        count--;
    }
}
cout<<count<<endl;
}


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

#include<stdio.h>
int main(){
  char s[5];
  int i,j=0;
  scanf("%s",s);
  for(i=0;i<4;i++)j+=s=='+'?1:-1
  printf("%d",j);
}


Compiler output:
main.c: In function 'main':
main.c:6:23: warning: comparison between pointer and integer
    6 |   for(i=0;i<4;i++)j+=s=='+'?1:-1
      |                       ^~
main.c:6:33: error: expected ';' before 'printf'
    6 |   for(i=0;i<4;i++)j+=s=='+'?1:-1
      |                                 ^
      |                                 ;
    7 |   printf("%d",j);
      |   ~~~~~~
Language: C++

#include <bits/stdc++.h>

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()
#define SP << " " 
#define LLi long long int

using namespace std;

int imax=2147483647;
long long int llimax=9223372036854775807;

//int型vectorを出力
void PV(vector<int> pvv) {
	rep(i, pvv.size()) cout << pvv[i] SP;
	cout << endl;
}

//LLi型vectorを出力
void PVL(vector<LLi> pvv) {
	rep(i, pvv.size()) cout << pvv[i] SP;
	cout << endl;
}

int main(){

	int ans=0;
	string s;
	cin>> s;

	rep(i, n){
		if(s[i]=='+') ans++;
		else ans--;
	}
 
	cout<< ans <<endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:16: error: 'n' was not declared in this scope
   31 |         rep(i, n){
      |                ^
a.cc:3:45: note: in definition of macro 'rep'
    3 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
      |                                             ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
using P = pair<int,int>;

int main(void){
    string s;
  cin >> s;
  int ans = 0;
  for(int i=0; i<4; i++){
  	if(s[i] == "+") ans++;
    else ans--;
  }
  cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |         if(s[i] == "+") ans++;
Language: C++

#include<bits\stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
  int ans=0;
for(int i = 0;i<4;i++){
  if(s[i]=='+')ans++;
  else ans--;
}
cout<<ans<<endl;}

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

#include <iostream>
using namespace std;

int main(){
  string s;
  cin >> s;
  
  int i = 0,j = 0
  while(j < 4){
    if(s[j] == '-')i = i - 1;
    else i = i + 1;
    j++;
  }
  cout << i;
}
    
     

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'while'
    9 |   while(j < 4){
      |   ^~~~~
Language: Java

import java.util.Scanner;
//import java.util.Arrays;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int plus = s.remove("-").length();
		System.out.println(plus - (4 - plus));
	}
}


Compiler output:
Main.java:7: error: cannot find symbol
		int plus = s.remove("-").length();
		            ^
  symbol:   method remove(String)
  location: variable s of type String
1 error
Language: C++

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

int main()
{
    string s;
    cin >> s;
    int cnt=0;
    for(int i = 0; i < s.size()i++)
    {
        if(s[i]=='-')cnt--;
        else cnt++;
    }
    cout << cnt;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:32: error: expected ';' before 'i'
   10 |     for(int i = 0; i < s.size()i++)
      |                                ^
      |                                ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  steing s;
  int ans = 0;
  cin >> s;
  for(int i = 0;i < 4;i++){
    if(s[i] == '-')ans--;
    else ans++;
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'steing' was not declared in this scope; did you mean 'stdin'?
    4 |   steing s;
      |   ^~~~~~
      |   stdin
a.cc:6:10: error: 's' was not declared in this scope
    6 |   cin >> s;
      |          ^
Language: C++

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

int main() {
  int ans = 0;
  for (int i = 0; i < 4; i++){
    char c;
    cin >> c;
    
    if (char == '+') {
      ans++;
    } else {
      ans--;
    }
  }
  
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: expected unqualified-id before '==' token
   10 |     if (char == '+') {
      |              ^~
Language: C++

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

int main() {
  int ans = 0;
  for (int i = 0; i < 4; i++){
    char c;
    cin >> c;
    
    if (char = '+') {
      ans++;
    } else {
      ans--;
    }
  }
  
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: expected unqualified-id before '=' token
   10 |     if (char = '+') {
      |              ^
Language: C++

#include <bits/stdc++.h>
#include <math.h>
#define _GLIBCXX_DEBUG
using namespace std;
int main() {
  
  string S;cin>>S;
  
  int ans-0;
  for(int i=0;i<4;i++){
    if(S[i]=='+'){
      ans++;
    }
    else{
      ans--;
    }
  }
  
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: expected initializer before '-' token
    9 |   int ans-0;
      |          ^
a.cc:12:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 |       ans++;
      |       ^~~
      |       abs
a.cc:15:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   15 |       ans--;
      |       ^~~
      |       abs
a.cc:19:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   19 |   cout<<ans<<endl;
      |         ^~~
      |         abs
Language: C++

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

int main() {
  string S;cin>>S;
  int A=0; int B=0;
  for(int i =0 i< S.size(); i++){
    if(S.at(i) == '+'){
      A++;
    }
    else{
      B++;
    }
  }
  cout<<A-B<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: expected ';' before 'i'
    7 |   for(int i =0 i< S.size(); i++){
      |               ^~
      |               ;
Language: C++

include <bits/stdc++.h>
using namespace std;
int main(){
      string s;
      cin>>s;
      int ans=0;
      for(int i=0;i<4;i++){
        if(s[i]=='+')ans++;
        else ans--;
      }
    cout<<ans;}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:4:7: error: 'string' was not declared in this scope
    4 |       string s;
      |       ^~~~~~
a.cc:5:7: error: 'cin' was not declared in this scope
    5 |       cin>>s;
      |       ^~~
a.cc:5:12: error: 's' was not declared in this scope
    5 |       cin>>s;
      |            ^
a.cc:11:5: error: 'cout' was not declared in this scope
   11 |     cout<<ans;}
      |     ^~~~
Language: C++

include <bits/stdc++.h>
using namespace std;
int main(){
      string s;
      cin>>s;
      int ans=0;
      for(int i=0;i<4;i++){
        if(s[i]=='+')ans++;
        else ans--;
      }
    cout<<ans;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:4:7: error: 'string' was not declared in this scope
    4 |       string s;
      |       ^~~~~~
a.cc:5:7: error: 'cin' was not declared in this scope
    5 |       cin>>s;
      |       ^~~
a.cc:5:12: error: 's' was not declared in this scope
    5 |       cin>>s;
      |            ^
a.cc:11:5: error: 'cout' was not declared in this scope
   11 |     cout<<ans;
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i=0;i<(n);i++)
using namespace std;
using ll = long long;
using P = pair<int,int>;
 
 
int main() {
    string s;
    cin >> s;
    ans=0;
    rep(i,4){
        if(s.at(i)=='+')ans++;
        else ans--;
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |     ans=0;
      |     ^~~
      |     abs
Language: C++

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


int main() {
    string S;
    cin >> S;

    int ans=0;

    for(int i =0 ;i<4;i++){
        if(S.at(i) == "+") ans++;
        else ans--;
    }

    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |         if(S.at(i) == "+") ans++;
      |            ~~~~~~~~^~~~~~
Language: C

#include <bits/stdc++.h>
using namespace std;
int main()
{
  char s[4];
  int i;
  int sum=0;
  cin>>s;
  for(i=0;i<4;i++){
    if(s[i]=='+') sum++;
    if(s[i]=='-') sum--;
  }
  cout<<sum;
}

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

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

int main(){
  
  string a;
  int  i,x = 0;
  cin >> a;
  
  if(a.at(i) == "+"){
    x++;
  }
  
  else if (a.at(i) == "-"){
    x--;
  }
    
  cout << x << endl;
  
}




Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   if(a.at(i) == "+"){
      |      ~~~~~~~~^~~~~~
a.cc:14:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |   else if (a.at(i) == "-"){
      |            ~~~~~~~~^~~~~~
Language: C++

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

int main(){
  
  string a;
  int  i,x = 0;
  cin >> a;
  
  if(s.at(i) == "+"){
    x++
  }
  
  else if (s.at(i) == "-"){
    x--
  }
    
  cout << x << endl;
  
}




Compiler output:
a.cc: In function 'int main()':
a.cc:10:6: error: 's' was not declared in this scope
   10 |   if(s.at(i) == "+"){
      |      ^
a.cc:11:8: error: expected ';' before '}' token
   11 |     x++
      |        ^
      |        ;
   12 |   }
      |   ~     
a.cc:15:8: error: expected ';' before '}' token
   15 |     x--
      |        ^
      |        ;
   16 |   }
      |   ~
Language: C++

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

int main(){
  
  string a;
  int x = 0;
  cin >> a;
  
  if(s.at(i) == "+"){
    x++
  }
  
  else if (s.at(i) == "-"){
    x--
  }
    
  cout << x << endl;
  
}


}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:6: error: 's' was not declared in this scope
   10 |   if(s.at(i) == "+"){
      |      ^
a.cc:10:11: error: 'i' was not declared in this scope
   10 |   if(s.at(i) == "+"){
      |           ^
a.cc:11:8: error: expected ';' before '}' token
   11 |     x++
      |        ^
      |        ;
   12 |   }
      |   ~     
a.cc:15:8: error: expected ';' before '}' token
   15 |     x--
      |        ^
      |        ;
   16 |   }
      |   ~     
a.cc: At global scope:
a.cc:23:1: error: expected declaration before '}' token
   23 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    string s;
    cin >> s;
    int ans=0;
    for(int i=0;i<S.length();i++){
        if(s[i]=='+')ans++;
        else ans--;
    }
    cout << ans << endl;
}

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

import java.util.Scanner;
public class Mainb {
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int num = N;
    int s = 0;
    while(num != 0){
      s += num % 10;
      num /= 10;
    }
    System.out.println(N % s == 0? "Yes":"No");
	}
}

Compiler output:
Main.java:2: error: class Mainb is public, should be declared in a file named Mainb.java
public class Mainb {
       ^
1 error
Language: Java

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
	Scanner scanner = new Scanner(System.in);
	int N = scanner.nextInt();

	int num = N;
	int s =0;

	while(num !=0) {
		s += num % 10;
		num /= 10;



	}

	System.out.println(N % s == 0? "yes":"no");

}
}


Compiler output:
Main.java:5: error: cannot find symbol
	Scanner scanner = new Scanner(System.in);
	^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
	Scanner scanner = new Scanner(System.in);
	                      ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

o.BufferedReader;
import java.io.InputStreamReader;


public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve(args);
    }

    public void solve(String[] args) {
        MyScanner scanner = new MyScanner();

        // ビジネスロジックここから
        
        
        int n = scanner.nextInt();
        int s = 0;
        int i = n;
        
        while (i > 0) {
            s += i % 10;
            i /= 10;
        }
        
        if (n % s == 0) {
        	System.out.println("Yes");
        }else
            System.out.println("No");
        
        
        // ビジネスロジックここまで

    }

    private class MyScanner {
        String[] s;
        int i;
        BufferedReader br;
        String reg = " ";
        MyScanner () {
            s = new String[0];
            i = 0;
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        public String next() {
            try {
                if (i < s.length) return s[i++];
                String line = br.readLine();
                while (line.equals("")) {line = br.readLine();}
                s = line.split(reg, 0);
                i = 0;return s[i++];
            } catch (Exception e) {e.printStackTrace();}
            return null;
        }
        public int nextInt() {
            try {return Integer.parseInt(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
        public double nextDouble() {
            try {return Double.parseDouble(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
        public long nextLong()  {
            try {return Long.parseLong(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
    }
}


Compiler output:
Main.java:1: error: class, interface, enum, or record expected
o.BufferedReader;
^
Main.java:2: error: class, interface, enum, or record expected
import java.io.InputStreamReader;
^
2 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll=long long;
#define rep(i,n) for(int i = 0; i < (int)(n); i++)
#define All(a) a.begin(),a.end()
#define INF 1000000007
const int MOD = 1000000007;
//accumulate(vec.begin(), vec.end(), 0)
//std::sort(v.begin(), v.end(), std::greater<Type>());
//set_intersection(x, x+7, y, y+6, back_inserter(v));
//set_union(x, x+7, y, y+6, back_inserter(v));
//set_difference(x, x+7, y, y+6, back_inserter(v));

int gcd(int x,int y){
  if(x%y==0) return y;
  else return gcd(y,x%y);
}

bool isPrime(int n){
  if(n < 2) return false;
  else if(n == 2) return true;
  else if(n%2==0) return false;

  for(int i=3;i<=sqrt(n);i++){
    if(n%i==0) return false;
  }
  return true;
}

int main(){
  string s;
  cin >> s;
  int n = s.size();
  int ans = 0;
  for(int i=0;i<n;i++){
    if(s[i]=="+") ans++;
    else ans--;
  }
  cout<< ans <<endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:36:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   36 |     if(s[i]=="+") ans++;
Language: Java

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scanner = new Scanner(System.in);

		String S = scanner.next();

		int seikai = 0;


		for (int i = 0; i <=3; i++) {

		if(S.substring(i,i+1).equals("+")) {    //文字列の中身だけ比較する

			 seikai++;
		}

			else {

			seikai--;
		}

		System.out.println(seikai);
}

}

}

Compiler output:
Main.java:6: error: cannot find symbol
		Scanner scanner = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:6: error: cannot find symbol
		Scanner scanner = new Scanner(System.in);
		                      ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scanner = new Scanner(System.in);

		String S = scanner.next();

		int seikai = 0;


		for (int i = 0; i <=3; i++) {

		if(S.substring(i,i+1).equals("+")) {    //文字列の中身だけ比較する

			 seikai++;
		}

			else {

			seikai--;
		}

		System.out.println(seikai);
}

}

}

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)
Main.java:28: error: class, interface, enum, or record expected
}
^
2 errors