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

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

int(){
  int a, b, c, d;
  cin >> d;
  a = d % 10;
  b = d / 10 % 10;
  c = d / 100 % 10;
  cout << a + b + c <<endl;
} 

Compiler output:
a.cc:4:5: error: expected unqualified-id before ')' token
    4 | int(){
      |     ^
Language: Java

import java.util.Scanner;

public class Main {
	Scanner sc = new Scanner(System.in);
	String str = sc.next();
	String substr;
	int count = 0;
	for (int i=0; i<str.length(); i++) {
		
		if (str.charAt(i) == '1') {
			count ++;
		}
	}
	System.out.println(count);
}


Compiler output:
Main.java:8: error: illegal start of type
	for (int i=0; i<str.length(); i++) {
	^
Main.java:8: error: > or ',' expected
	for (int i=0; i<str.length(); i++) {
	                          ^
Main.java:8: error: <identifier> expected
	for (int i=0; i<str.length(); i++) {
	                               ^
Main.java:14: error: <identifier> expected
	System.out.println(count);
	                  ^
Main.java:14: error: <identifier> expected
	System.out.println(count);
	                        ^
5 errors
Language: Java

import java.util.Scanner;

public class Main {
	Scanner sc = new Scanner(System.in);
	String str = sc.next();
	String substr;
	int count = 0;
			
	for (int i=0; i<str.length(); i++) {
		if (str.charAt(i) == "1") {
			count ++;
		}
	}
	System.out.println(count);
}


Compiler output:
Main.java:9: error: illegal start of type
	for (int i=0; i<str.length(); i++) {
	^
Main.java:9: error: > or ',' expected
	for (int i=0; i<str.length(); i++) {
	                          ^
Main.java:9: error: <identifier> expected
	for (int i=0; i<str.length(); i++) {
	                               ^
Main.java:14: error: <identifier> expected
	System.out.println(count);
	                  ^
Main.java:14: error: <identifier> expected
	System.out.println(count);
	                        ^
5 errors
Language: Java

import java.util.Scanner;

public class Main {
	Scanner sc = new Scanner(System.in);
	String str = sc.next();
	String substr;
	int count = 0;
	
	for (int i=0; i<str.length(); i++) {
		substr = str.substring(i, i+1);
		if ("1" == substr) {
			count ++;
		}
	}
	System.out.println(count);
}


Compiler output:
Main.java:9: error: illegal start of type
	for (int i=0; i<str.length(); i++) {
	^
Main.java:9: error: > or ',' expected
	for (int i=0; i<str.length(); i++) {
	                          ^
Main.java:9: error: <identifier> expected
	for (int i=0; i<str.length(); i++) {
	                               ^
Main.java:15: error: <identifier> expected
	System.out.println(count);
	                  ^
Main.java:15: error: <identifier> expected
	System.out.println(count);
	                        ^
5 errors
Language: C++

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

int main(){
  string s;
  cin >> s;
  int x = 0;
  int i;
  for(i = 0; i<=2; ++i){
      if (s[i] == "1") ++x;
  }
   cout << x << endl;
}


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

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

int main(){
  string s;
  cin >> s;
  int x = 0;
  int i;
  for(i = 0; i<=2; ++i){
      if (s[i] = "1") ++x;
  }
   cout << x << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   10 |       if (s[i] = "1") ++x;
      |                  ^~~
      |                  |
      |                  const char*
Language: C++

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

int main(){
  string s;
  cin >> s;
  int x = 0;
  for(i = 1; i<=3; ++i){
      if (s[i] == 1) ++x;
  }
   cout << x << endl;
}


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

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

int main(){ 
  string str;
  cin>>str;
  
  int count=0;
    
    for(i=0;i<3;i++){
   
     if(str.at(i)=='1'){
       
      count++;
     }
    }
  
  cout<<count<<endl;
  
}
       
  


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

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

int main(){ 
  string str;
  cin>>str;
  
  int count=0
    
    for(i=0;i<3;i++){
   
     if(str.at(i)=='1'){
       
      count++;
     }
    }
  
  cout<<count<<endl;
  
}
       
  

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

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

int main(){
  string s;
  cin>>s;
  
  int a=0;
  
  for(i=0;i<3;i++){
    
    if(s.at(i)=='1'){
      a++;
    }
    
  }
   
  cout<<a<<endl;
  
}


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

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

int main(){
  string s;
  cin>>s;
  
  int a=0;
  
  for(i=0;i<3;i++){
    
    if(s.at(i)=='1'){
      a=a+1
    }
    
  }
   
  cout<<a<<endl;
  
}


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

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

int a[210];
int n;
int main(){
  int res = 0;
  cin >> n;
  for(int i = 0 ; i < n ; ++i )  cin >> a[i] ;
  while(true){
    int flag = 0
    for(int j = 0; j < n; ++j){
      if(a[j] % 2 != 0) flag = 1;
    }
    if(flag != 0) break; 
    for(int i = 0;i < n; ++i){
      a[i] /= 2;
    }
    ++res;
  }
  cout << res << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: expected ',' or ';' before 'for'
   13 |     for(int j = 0; j < n; ++j){
      |     ^~~
a.cc:13:20: error: 'j' was not declared in this scope
   13 |     for(int j = 0; j < n; ++j){
      |                    ^
Language: C++

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

int a[210];
int n;
int main(){
  int res = 0;
  cin >> n;
  for(int i = 0 ; i < n ; ++i )  cin >> a[i] ;
  int flag = 1;
  while(flag = 1){
    for(int j = 0; j < n; ++j){
      if(a[j] % 2 != 0){
        flag =0;
        a[j] = a[j]/2;
    }
    if(flag = 0) break;
  ++res;
  }
  cout << res << endl;
}


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

#include<bits/stdc++.h>

using namespace std
  
int main (){
  int s1,s2,s3;
    cin>>s1>>s2>>s3;
   cout<<s1+s2+s3<<endl;
}

Compiler output:
a.cc:3:20: error: expected ';' before 'int'
    3 | using namespace std
      |                    ^
      |                    ;
    4 | 
    5 | int main (){
      | ~~~
Language: C++

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

int main() {
  int a,b,c,d;
    cin>>a;
  	b=a/100;
  	c=(a-b*100)/10
    d=(a-b*100-10*c)
    cout<<(b+c+d)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:23: error: expected ';' before 'd'
    8 |         c=(a-b*100)/10
      |                       ^
      |                       ;
    9 |     d=(a-b*100-10*c)
      |     ~
Language: C++

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

int main() {
  int N;
  cin >> N;
  int a[N],ans=0;
  for(int i=0; i<N; i++){
    cin >> a[i]
  }
  while(flag==0){
    for(int i=0; i<N; i++){
	  if(a[i]%2 != 0){
        flag=1;
 	    cout << ans;
	  }
	  a[i] /= 2
	}
  ans++;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: expected ';' before '}' token
    9 |     cin >> a[i]
      |                ^
      |                ;
   10 |   }
      |   ~             
a.cc:11:9: error: 'flag' was not declared in this scope
   11 |   while(flag==0){
      |         ^~~~
a.cc:17:20: error: expected ';' before '}' token
   17 |           a[i] /= 2
      |                    ^
      |                    ;
   18 |         }
      |         ~
Language: C++

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

int main() {
  string a;
  int i,count=0;
  cin >> a;
  for(i=0;i<2;i++){
    if(a[i]=='1'){
      count++;
    }
  }
  cout << count << endl;
    
  
}#include <bits/stdc++.h>
using namespace std;

int main() {
  string a;
  int i,count=0;
  cin >> a;
  for(i=0;i<3;i++){
    if(a[i]=='1'){
      count++;
    }
  }
  cout << count << endl;
    
  
}

Compiler output:
a.cc:16:2: error: stray '#' in program
   16 | }#include <bits/stdc++.h>
      |  ^
a.cc:16:3: error: 'include' does not name a type
   16 | }#include <bits/stdc++.h>
      |   ^~~~~~~
a.cc:19:5: error: redefinition of 'int main()'
   19 | int main() {
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main() {
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a, b, c, d;
  cin >> a;
  b=a/100;
  c=(a-b*100)/10;
  d=a-b:100-c*10;
  cout << b+c+d << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: expected ';' before ':' token
    9 |   d=a-b:100-c*10;
      |        ^
      |        ;
Language: C++

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

int main() {
  string S1,S2,S3;
  cin >> S1 >> S2 >> S3;
  int ball;
  if(S1 == "1"){
    ball +=;
  }
  if(S2 == "1"){
    ball +=;
  }
  if(S3 == "1"){
    ball +=;
  }
  cout << ball << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: expected primary-expression before ';' token
    9 |     ball +=;
      |            ^
a.cc:12:12: error: expected primary-expression before ';' token
   12 |     ball +=;
      |            ^
a.cc:15:12: error: expected primary-expression before ';' token
   15 |     ball +=;
      |            ^
Language: C++

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

int main() {
   std::string s;
   std::cin >> s;
   std::cout << std::count(s.cbegin, s.cend, '1') << std::endl;
   return 0;
}


Compiler output:
a.cc:6:1: error: extended character   is not valid in an identifier
    6 |    std::string s;
      | ^
a.cc:6:1: error: extended character   is not valid in an identifier
a.cc:7:1: error: extended character   is not valid in an identifier
    7 |    std::cin >> s;
      | ^
a.cc:7:1: error: extended character   is not valid in an identifier
a.cc:8:1: error: extended character   is not valid in an identifier
    8 |    std::cout << std::count(s.cbegin, s.cend, '1') << std::endl;
      | ^
a.cc:8:1: error: extended character   is not valid in an identifier
a.cc:9:1: error: extended character   is not valid in an identifier
    9 |    return 0;
      | ^
a.cc:9:1: error: extended character   is not valid in an identifier
a.cc: In function 'int main()':
a.cc:6:1: error: '\U000000a0\U000000a0' was not declared in this scope
    6 |    std::string s;
      | ^~
a.cc:7:3: error: expected ';' before 'std'
    7 |    std::cin >> s;
      |   ^~~~
      |   ;
a.cc:8:3: error: expected ';' before 'std'
    8 |    std::cout << std::count(s.cbegin, s.cend, '1') << std::endl;
      |   ^~~~
      |   ;
a.cc:9:3: error: expected ';' before 'return'
    9 |    return 0;
      |   ^~~~~~~
      |   ;
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main() {
   string s;
   cin >> s;
   cout << std::count(s.cbegin, s.cend, '1') << endl;
   return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'count' is not a member of 'std'; did you mean 'cout'?
    9 |    cout << std::count(s.cbegin, s.cend, '1') << endl;
      |                 ^~~~~
      |                 cout
Language: C++

#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()
//#pragma GCC optimize ("-O3")
using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
typedef long long ll; const int inf = INT_MAX / 2; const ll infl = 1LL << 60;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a = b; return 1; } return 0; }
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void _main()
{
    string s;
    cin >> s;
    int ans = 0;
    rep(const char c : s)
    {
        if (c == '0') ++ans;
    }
    cout << ans << endl;
}


Compiler output:
a.cc:18:25: error: macro "rep" requires 3 arguments, but only 1 given
   18 |     rep(const char c : s)
      |                         ^
a.cc:2:9: note: macro "rep" defined here
    2 | #define rep(i,a,b) for(int i=a;i<b;i++)
      |         ^~~
a.cc: In function 'void _main()':
a.cc:18:5: error: 'rep' was not declared in this scope
   18 |     rep(const char c : s)
      |     ^~~
Language: C++

#include <iostream>

using namespace std;

int main() {
  string s;
  cin >> s;
  cout << count(s.begin(), s.end(), '1') << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: 'count' was not declared in this scope
    8 |   cout << count(s.begin(), s.end(), '1') << endl;
      |           ^~~~~
Language: C++

#include<iostream>
using namespace std;

int main() {
    string s;
    cin >> s;
    int counter = 0;
    if (s[0] == "1") counter++;
    if (s[1] == "1") counter++;
    if (s[2] == "1") counter++;
    cout << counter << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |     if (s[0] == "1") counter++;
a.cc:9:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |     if (s[1] == "1") counter++;
a.cc:10:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |     if (s[2] == "1") counter++;
Language: C

#include<stdio.h>

int check(int *a) {
	int i;
	for(i = 0; i < )
}

int main() {
	int n, i
	int cnt = 0;
	int a[200];
	scanf("%d", &n);
	for (i = 0; i < n; i++) scanf("%d", &a[i]);
	int check() {
		for (i = 0; i < n; i++) {
			if (a[i] % 2 == 1) return 0;
		}
		return 1;
	}
	void div() {
		for (i = 0; i < n; i++) {
			a[i] /= 2;
		}
	}
	while (check()) {
		div();
		cnt++;
	}
	printf("%d", cnt);
}

Compiler output:
main.c: In function 'check':
main.c:5:24: error: expected expression before ')' token
    5 |         for(i = 0; i < )
      |                        ^
main.c:6:1: error: expected expression before '}' token
    6 | }
      | ^
main.c: In function 'main':
main.c:10:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
   10 |         int cnt = 0;
      |         ^~~
main.c:13:14: error: 'i' undeclared (first use in this function)
   13 |         for (i = 0; i < n; i++) scanf("%d", &a[i]);
      |              ^
main.c:13:14: note: each undeclared identifier is reported only once for each function it appears in
main.c:27:17: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
   27 |                 cnt++;
      |                 ^~~
      |                 int
Language: Java

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        s = s.replaceAll("0", "");
        System.out.println(s.length());
    }
}


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

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

int main() {
  int a;
  int b;
  int c;
  String s;

  cin >> s;
  a = (int) s[0];
  b = (int) s[1];
  c = (int) s[2];

  cout << a + b + c << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'String' was not declared in this scope
    8 |   String s;
      |   ^~~~~~
a.cc:10:10: error: 's' was not declared in this scope
   10 |   cin >> s;
      |          ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  int ans;
  char s[3];
  cin>>s;
  if(s[1]==1){ans=+1;}
  if(s[2]==2){ans=+1;}
  if(s[3]==3){ans=+1;}
  cout<<ans<<endl;
  

Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: expected '}' at end of input
   10 |   cout<<ans<<endl;
      |                   ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  cin>>s;
  int ans;
  char s[3];
  if(s[1]==1){ans=+1;}
  if(s[2]==2){ans=+1;}
  if(s[3]==3){ans=+1;}
  cout<<ans<<endl;
  

Compiler output:
a.cc: In function 'int main()':
a.cc:4:8: error: 's' was not declared in this scope
    4 |   cin>>s;
      |        ^
a.cc:10:19: error: expected '}' at end of input
   10 |   cout<<ans<<endl;
      |                   ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C

int main(void){
  
  string s;
  int i;
  i=0;
  scanf("%d",&s);
  if(s[0]=='1')
    i++;
  if(s[1]=='1')
    i++;
  if(s[2]=='1')
    i++;
  printf("%d",i);
  return 0;
}




Compiler output:
main.c: In function 'main':
main.c:3:3: error: unknown type name 'string'
    3 |   string s;
      |   ^~~~~~
main.c:6:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 |   scanf("%d",&s);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void){
main.c:6:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |   scanf("%d",&s);
      |   ^~~~~
main.c:6:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:7: error: subscripted value is neither array nor pointer nor vector
    7 |   if(s[0]=='1')
      |       ^
main.c:9:7: error: subscripted value is neither array nor pointer nor vector
    9 |   if(s[1]=='1')
      |       ^
main.c:11:7: error: subscripted value is neither array nor pointer nor vector
   11 |   if(s[2]=='1')
      |       ^
main.c:13:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   13 |   printf("%d",i);
      |   ^~~~~~
main.c:13:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:13:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:13:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

int main(void){
  
  char s[2];
  int i;
  i=0;
  scanf("%d",&a);
  if(s[0]==1)
    i++;
  if(s[1]==1)
    i++;
  if(s[2]==1)
    i++;
  printf("%d",i);
  return 0;
}




Compiler output:
main.c: In function 'main':
main.c:6:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 |   scanf("%d",&a);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void){
main.c:6:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |   scanf("%d",&a);
      |   ^~~~~
main.c:6:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:15: error: 'a' undeclared (first use in this function)
    6 |   scanf("%d",&a);
      |               ^
main.c:6:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   13 |   printf("%d",i);
      |   ^~~~~~
main.c:13:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:13:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:13:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
    int a;
    cin>>a;
    
    if(a=="000"){
    cout<<0<<endl;
    }
    if(a=="001"||a=="010"||a=="100"){
    cout<<1<<endl;
    }
    if(a=="011"||a=="101"||a=="110"){
    cout<<2<<endl;
    }
    if(a=="111"){
    cout<<3<<endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |     if(a=="000"){
      |        ~^~~~~~~
a.cc:11:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |     if(a=="001"||a=="010"||a=="100"){
      |        ~^~~~~~~
a.cc:11:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |     if(a=="001"||a=="010"||a=="100"){
      |                  ~^~~~~~~
a.cc:11:29: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |     if(a=="001"||a=="010"||a=="100"){
      |                            ~^~~~~~~
a.cc:14:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |     if(a=="011"||a=="101"||a=="110"){
      |        ~^~~~~~~
a.cc:14:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |     if(a=="011"||a=="101"||a=="110"){
      |                  ~^~~~~~~
a.cc:14:29: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |     if(a=="011"||a=="101"||a=="110"){
      |                            ~^~~~~~~
a.cc:17:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |     if(a=="111"){
      |        ~^~~~~~~
Language: C++

#include<iostram>
using namespace std;
int main(){
  char a,b,c;
  cin>>a>>b>>c;
  int ans=0;
  if(a=='1')ans++;
  if(b=='1')ans++;
  if(c=='1')ans++;
  cout<<ans;
}

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

#include<bits/stdc++.h>
using namespace std;
 
int main() {
	int ans = 0;
	bool div_by_2 = true;
	int N ;
	int  A[] = {  };
   cin>>n;
 
	while (div_by_2) {
		for (int i = 0; i < N; i++)
		{
          cin>>A[i];
			if (A[i]%2==1)
			{
				div_by_2 = false;
				break;
			}
			else
			{
				A[i] /= 2;
			}
		}
		//全て2で割り切れる
		if (div_by_2) {
			ans++;
		}
	}
	cout << ans << endl;
}

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

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

int main() {
  string s;
  cin >> s;
  ll ans = 0;
  for (auto & a : s) {
    if (a == '1') ans += 1;
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'll' was not declared in this scope
    8 |   ll ans = 0;
      |   ^~
a.cc:10:19: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |     if (a == '1') ans += 1;
      |                   ^~~
      |                   abs
a.cc:12:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

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

int main() {
  int s;
  cin >> s;
  s1 = s/100;
  s2 = (s-s1*100)/10;
  s3 = s-(s1*100+s2*10);
  cout << s1+s2+s3 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 's1' was not declared in this scope; did you mean 's'?
    7 |   s1 = s/100;
      |   ^~
      |   s
a.cc:8:3: error: 's2' was not declared in this scope; did you mean 's'?
    8 |   s2 = (s-s1*100)/10;
      |   ^~
      |   s
a.cc:9:3: error: 's3' was not declared in this scope; did you mean 's'?
    9 |   s3 = s-(s1*100+s2*10);
      |   ^~
      |   s
Language: Java


import java.util.Scanner;

public class main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//int times = Integer.parseInt(sc.nextLine());
		//int bit = 0;

        String s = sc.nextLine();
        int cnt = 0;

        for(int i=0;i<3;i++){
            char x = s.charAt(i);

            if(x == '1'){
                cnt ++;
            }
        }
        System.out.println(cnt);

	}
}


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


import java.util.Scanner;

public class a {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//int times = Integer.parseInt(sc.nextLine());
		//int bit = 0;

        String s = sc.nextLine();
        int cnt = 0;

        for(int i=0;i<3;i++){
            char x = s.charAt(i);

            if(x == '1'){
                cnt ++;
            }
        }
        System.out.println(cnt);

	}
}


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

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

int main() {
  
  int s₁;
  int s₂;
  int s₃;
  
  cin>>s₁>>s₂>>s₃;
  cout<<s₁+s₂+s₃<<endl;
}

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

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

int main() {
  int a,b,c;
  cin >> a >> b >> c ;
  cout << a + b + C << endl;
}
  

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

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

int main(){
  string a;
 int c,d,e;
  c=0
  cin>>a;
  for(int i=0;i<3;i++){
     if(a[i]==1){
   c++;
     }
  }
      cout<<c<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: expected ';' before 'cin'
    7 |   c=0
      |      ^
      |      ;
    8 |   cin>>a;
      |   ~~~
Language: C++

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

int main() {
	string s;
  	cin >> s;
  
  	int sum = 0;
  
  	if(s[0] == "1") sum++;
  	if(s[1] == "1") sum++;
  	if(s[2] == "1") sum++;
  
  	cout << sum << endl;
}

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

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

int main() {
	string s;
  	cin >> s;
  
  	int sum = 0;
  
  	if(s[0] = "1") sum++;
  	if(s[1] = "1") sum++;
  	if(s[2] = "1") sum++;
  
  	cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   10 |         if(s[0] = "1") sum++;
      |                   ^~~
      |                   |
      |                   const char*
a.cc:11:19: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   11 |         if(s[1] = "1") sum++;
      |                   ^~~
      |                   |
      |                   const char*
a.cc:12:19: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   12 |         if(s[2] = "1") sum++;
      |                   ^~~
      |                   |
      |                   const char*
Language: C++

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

int main() {
	string s;
  	cin >> s;
  
  	int sum = 0;
  
  	if(s[0]) = "1" sum++;
  	if(s[1]) = "1" sum++;
  	if(s[2]) = "1" sum++;
  
  	cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: expected primary-expression before '=' token
   10 |         if(s[0]) = "1" sum++;
      |                  ^
a.cc:11:18: error: expected primary-expression before '=' token
   11 |         if(s[1]) = "1" sum++;
      |                  ^
a.cc:12:18: error: expected primary-expression before '=' token
   12 |         if(s[2]) = "1" sum++;
      |                  ^
Language: C++

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

int main() {
	string s;
  	cin >> s;
  
  	int sum = 0;
  
  	if(s[0]) == "1" sum++;
  	if(s[1]) == "1" sum++;
  	if(s[2]) == "1" sum++;
  
  	cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: expected primary-expression before '==' token
   10 |         if(s[0]) == "1" sum++;
      |                  ^~
a.cc:11:18: error: expected primary-expression before '==' token
   11 |         if(s[1]) == "1" sum++;
      |                  ^~
a.cc:12:18: error: expected primary-expression before '==' token
   12 |         if(s[2]) == "1" sum++;
      |                  ^~
Language: C

#include<stdio.h>

int zero_or_one_cnt( a){
 int i;
 int cnt = 0;
 for( i = 0; i < 3; i++)
 {
    if( a[i]== '1'){
        cnt += 1;
    }
 }
 return cnt;
}

int main(void){
    char a[3];
    int cnt;
    scanf("%s",a);
    cnt = zero_or_one_cnt(a);
    printf("%d",cnt);
    return 0;

}

Compiler output:
main.c: In function 'zero_or_one_cnt':
main.c:3:5: error: type of 'a' defaults to 'int' [-Wimplicit-int]
    3 | int zero_or_one_cnt( a){
      |     ^~~~~~~~~~~~~~~
main.c:8:10: error: subscripted value is neither array nor pointer nor vector
    8 |     if( a[i]== '1'){
      |          ^
Language: C

#include <stdio.h>

int main(void){
  str S[3];
  int i, cnt = 0;
  scanf("%s", S);
  for(i=0;i<3;i++){
    if(S[i] == '1'){
      cnt++;
    }
  }
  printf("%d", cnt);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:3: error: unknown type name 'str'
    4 |   str S[3];
      |   ^~~
Language: C++

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

int main() {
  int x, y, z;
  cin >> x;
  y = x - (x / 100) *100
  z = y - (y / 10) *10
  cout << x / 100 + y / 10 + z << endl
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:25: error: expected ';' before 'z'
    7 |   y = x - (x / 100) *100
      |                         ^
      |                         ;
    8 |   z = y - (y / 10) *10
      |   ~
Language: C++

#include <iostream>

using namespace std;

int main() {
    string input;
    cin >> input;
    cout << std::count(input.cbegin(), input.cend(), '1') << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: 'count' is not a member of 'std'; did you mean 'cout'?
    8 |     cout << std::count(input.cbegin(), input.cend(), '1') << endl;
      |                  ^~~~~
      |                  cout
Language: C++

#include <iostream>

using namespace std;

int main() {
    string input;
    cin >> input;
    cout << count(input.cbegin(), input.cend(), '1') << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: 'count' was not declared in this scope
    8 |     cout << count(input.cbegin(), input.cend(), '1') << endl;
      |             ^~~~~
Language: C++

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

int main() {
  int R;
  R = 0;
  string S;
  if(S[0]=='1') R+1;
  if(S[1]=='1') R+1;
  if(S[2]=='1') R+1;
  cont << R << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'cont' was not declared in this scope; did you mean 'const'?
   11 |   cont << R << endl;
      |   ^~~~
      |   const
Language: C++

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

int main() {
  int R;
  R = 0;
  string S;
  if(S[0]=='1') R+1;
  if(S[1]=='1') R+1;
  if(S[2]=='1') R+1;
  count << R << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator<<'
   11 |   count << R << endl;
      |   ~~~~~~^~~~
Language: C++

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

int main() {
  int R;
  R = 0;
  string S;
  if(R[0]=='1') R+1;
  if(R[1]=='1') R+1;
  if(R[2]=='1') R+1;
  count << R << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: invalid types 'int[int]' for array subscript
    8 |   if(R[0]=='1') R+1;
      |       ^
a.cc:9:7: error: invalid types 'int[int]' for array subscript
    9 |   if(R[1]=='1') R+1;
      |       ^
a.cc:10:7: error: invalid types 'int[int]' for array subscript
   10 |   if(R[2]=='1') R+1;
      |       ^
a.cc:11:9: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator<<'
   11 |   count << R << endl;
      |   ~~~~~~^~~~
Language: C++

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

int main() {
  int R;
  
  cin >> R;
 
  cout << R[0] + R[1] + R[2] << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: invalid types 'int[int]' for array subscript
    9 |   cout << R[0] + R[1] + R[2] << endl;
      |            ^
a.cc:9:19: error: invalid types 'int[int]' for array subscript
    9 |   cout << R[0] + R[1] + R[2] << endl;
      |                   ^
a.cc:9:26: error: invalid types 'int[int]' for array subscript
    9 |   cout << R[0] + R[1] + R[2] << endl;
      |                          ^
Language: C++

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

int main() {
  int R;
  
  cin >> R;
 
  cout << R[1] + R[2] + R[3] << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: invalid types 'int[int]' for array subscript
    9 |   cout << R[1] + R[2] + R[3] << endl;
      |            ^
a.cc:9:19: error: invalid types 'int[int]' for array subscript
    9 |   cout << R[1] + R[2] + R[3] << endl;
      |                   ^
a.cc:9:26: error: invalid types 'int[int]' for array subscript
    9 |   cout << R[1] + R[2] + R[3] << endl;
      |                          ^
Language: C

#include<stdio.h>
int main(){
  	int count=0;
	char a[3];
  
  	for(i=0;i<3;i++){
    	scanf("%c",a[i]);
      	if(a[i]=='1')count++;
    }
  	printf("%d",count);
  	return 0;
}

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

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

int main()
{
  int a, b, c;
  cin >> a ;
  b = a % 100;
  c = b % 10;
  cout < < a/100+b/10+c < < endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: expected primary-expression before '<' token
   10 |   cout < < a/100+b/10+c < < endl;
      |          ^
a.cc:10:27: error: expected primary-expression before '<' token
   10 |   cout < < a/100+b/10+c < < endl;
      |                           ^
Language: C++

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

int main(){
 int a,b,c;
 cin>>A;
  a=A/100;
  b=A/10-a*10;
  c=A-a*100-b*10;

 if(a==1 && b==1 && c==1){
   cout<<3<<endl;
 }

 else if((a==1 && b==1) || (a==1 && c==1) || (b==1 &&c==1)){
   cout<<2<<endl;
 }
 else if(a==1 || b==1 || c==1){
   cout<<1<<endl;
 }
   else{
     cout<<0<<endl;
   }
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: 'A' was not declared in this scope
    6 |  cin>>A;
      |       ^
Language: C++

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

int main(){
  int a,b,c;
  cin >> a >> b >> c;
  
  if( a == 0 && b == 0 && c==0 ){
  cout << 0 << endl;
  }
  else if ((a==1 && b==0 && c==0)||(a==0 && b==1 && c==0)||(a==0 && b==0 && c==1))
  {
  cout << 1 << endl;
  }  
  else if ((a==1 && b==1 && c==0)||(a==0 && b==1 && c==1)||(a==1 && b==0 && c==1))
  {
  cout << 2 << endl;
  }
  else (a == 1 && b == 1 && c==1)
  {
    cout << 3 << endl;
   }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:19:34: error: expected ';' before '{' token
   19 |   else (a == 1 && b == 1 && c==1)
      |                                  ^
      |                                  ;
   20 |   {
      |   ~
Language: C++

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

int main(){
  int a,b,c;
  cin >> a >> b >> c;
  
  if( a == 0 && b == 0 && c==0 ){
  cout << 0 << enndl;
  }
  else if ((a==1 && b==0 && c==0)||(a==0 && b==1 && c==0)||(a==0 && b==0 && c==1))
  {
  cout << 1 << endl;
  }  
  else if ((a==1 && b==1 && c==0)||(a==0 && b==1 && c==1)||(a==1 && b==0 && c==1))
  {
  cout << 2 << endl;
  }
  else 
    cout << 3 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: 'enndl' was not declared in this scope
    9 |   cout << 0 << enndl;
      |                ^~~~~
Language: C++

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

int main(){
  int a,b,c;
  cin>>a>>b>>c;
  
  if(a==b==c==1){
    cout<<3<<endl;
  }
  
  else if(a==b==1 || a==c==1 || b==c==1){
    cout<<2<<endl;
    ]
  else if(a==1 || b==1 || c==1){
    cout<<1<<endl;
  }
    else{
      cout<<0<<endl;
    }
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:14:5: error: expected primary-expression before ']' token
   14 |     ]
      |     ^
a.cc:18:5: error: expected '}' before 'else'
   18 |     else{
      |     ^~~~
a.cc:12:41: note: to match this '{'
   12 |   else if(a==b==1 || a==c==1 || b==c==1){
      |                                         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int ans = 0;
  string s ;
  cin >> s;
  for (int i=0 ; i<3;i++){
    if(s.at(i) ='1'){
      ans++;
    }
    
  cout << ans <<endl;
}

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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  vector <int> vec (3);
  int ans = 0;
  for (int i = 0 ;i <3 ;i++){
    cin >> vec(i) ;
    if (vec(i)=1){
      ans++;
    }
  }
  cout << ans <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: no match for call to '(std::vector<int>) (int&)'
    8 |     cin >> vec(i) ;
      |            ~~~^~~
a.cc:9:12: error: no match for call to '(std::vector<int>) (int&)'
    9 |     if (vec(i)=1){
      |         ~~~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  vector <int> vec (3);
  int ans = 0;
  for (i = 0 ;i <3 ;i++){
    cin >> vec(i) ;
    if (vec(i)=1){
      ans++;
    }
  }
  cout << ans <<endl;
}

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

#include <iostream>

using namespace std;
int main() {
    int input, output;
    cin >> input;

    for (int i=0; i < 3; i++) {
        output += (input % 10);
        input = input / 10;
    }

    cout << output << endl;
    return 0;
}
}

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

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

int main() {
  string s;
    cin >> s;
    int ans = 0;
  if (s[0] == '1') ans++;
  if (s[1] == '1') ans++;
  if (s[2] == '1') ans++;
  cout << ans << endl;
  retrun 0;
}


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

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

int main() {
  string s;
    cin >> s;
    int ans == 0;
  if (s[0] == '1') ans++;
  if (s[1] == '1') ans++;
  if (s[2] == '1') ans++;
  cout << ans << endl;
  retrun 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: expected initializer before '==' token
    7 |     int ans == 0;
      |             ^~
a.cc:8:20: error: 'ans' was not declared in this scope; did you mean 'abs'?
    8 |   if (s[0] == '1') ans++;
      |                    ^~~
      |                    abs
a.cc:9:20: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 |   if (s[1] == '1') ans++;
      |                    ^~~
      |                    abs
a.cc:10:20: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |   if (s[2] == '1') ans++;
      |                    ^~~
      |                    abs
a.cc:11:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |   cout << ans << endl;
      |           ^~~
      |           abs
a.cc:12:3: error: 'retrun' was not declared in this scope
   12 |   retrun 0;
      |   ^~~~~~
Language: C++

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

int main() {
  string = s;
    cin >> s;
    int ans == 0;
  if (s[0] == 1) ans++;
  if (s[1] == 1) ans++;
  if (s[2] == 1) ans++;
  cout << ans << endl;
  retrun 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: expected unqualified-id before '=' token
    5 |   string = s;
      |          ^
a.cc:6:12: error: 's' was not declared in this scope
    6 |     cin >> s;
      |            ^
a.cc:7:13: error: expected initializer before '==' token
    7 |     int ans == 0;
      |             ^~
a.cc:8:18: error: 'ans' was not declared in this scope; did you mean 'abs'?
    8 |   if (s[0] == 1) ans++;
      |                  ^~~
      |                  abs
a.cc:9:18: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 |   if (s[1] == 1) ans++;
      |                  ^~~
      |                  abs
a.cc:10:18: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |   if (s[2] == 1) ans++;
      |                  ^~~
      |                  abs
a.cc:11:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |   cout << ans << endl;
      |           ^~~
      |           abs
a.cc:12:3: error: 'retrun' was not declared in this scope
   12 |   retrun 0;
      |   ^~~~~~
Language: C++

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

int main() {
  string;
  cin >> S;
  int c=0;
  if(S.at(0)==1){
    c=c+1
  }
  if(S.at(1)==1){
    c=c+1
  }
  if(S.at(2)==1){
    c=c+1
  }
  
  
  cout << c << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: declaration does not declare anything [-fpermissive]
    5 |   string;
      |   ^~~~~~
a.cc:6:10: error: 'S' was not declared in this scope
    6 |   cin >> S;
      |          ^
a.cc:9:10: error: expected ';' before '}' token
    9 |     c=c+1
      |          ^
      |          ;
   10 |   }
      |   ~       
a.cc:12:10: error: expected ';' before '}' token
   12 |     c=c+1
      |          ^
      |          ;
   13 |   }
      |   ~       
a.cc:15:10: error: expected ';' before '}' token
   15 |     c=c+1
      |          ^
      |          ;
   16 |   }
      |   ~
Language: C++

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

int main() {
  vector<int> s(3);
  for(int i=0; i<3; i++)
    cin >>s.at(i);
  int N=0;
  for(int i=o; i<3; i++){
    if(s.at(i)==1)
      N++;
  }
  cout <<N <<endl;
}


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

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

int main() {
  vector<int>.s(3);
  for(int i=0; i<3; i++)
    cin >>s.at(i);
  int N=0;
  for(int i=o; i<3; i++){
    if(s.at(i)==1)
      N++;
  }
  cout <<N <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:14: error: expected unqualified-id before '.' token
    5 |   vector<int>.s(3);
      |              ^
a.cc:7:11: error: 's' was not declared in this scope
    7 |     cin >>s.at(i);
      |           ^
a.cc:9:13: error: 'o' was not declared in this scope
    9 |   for(int i=o; i<3; i++){
      |             ^
a.cc:10:8: error: 's' was not declared in this scope
   10 |     if(s.at(i)==1)
      |        ^
Language: Java

import java.util.Scanner;

public class A {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] line = sc.nextLine().split("");
		sc.close();
		int cnt = 0;

		for(int i = 0; i< line.length; i++) {
			if(line[i].equals("1")) {
				cnt++;
			}
		}

		System.out.println("答え：" + cnt);

	}

}


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

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

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

    int cnt = 0;
    for (char x : s)
    {
        if (x == '1')
        {
            c++;
        }
    }

    cout << cnt << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: 'c' was not declared in this scope
   14 |             c++;
      |             ^
Language: C++

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

int main() {
  vector<int> a(3);
  for(int i=0;i<a.size();i++){
    cin>> a.at(i);
  }
  int count=0;
  for(int i=0;i<a.size();i++){
    if (a.at(i) ==1){
      count ++
    }
  }
  cout<< count <<endl;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: expected ';' before '}' token
   12 |       count ++
      |               ^
      |               ;
   13 |     }
      |     ~
Language: C++

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

int main() {
  vector<int> a(3);
  for(i=0;i<a.size();i++){
    cin>> a.at(i);
  }
  int count=0;
  for(i=0;i<a.size();i++){
    if (a.at(i) ==1){
      count ++
    }
  }
  cout<< count <<endl;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: 'i' was not declared in this scope
    6 |   for(i=0;i<a.size();i++){
      |       ^
a.cc:10:7: error: 'i' was not declared in this scope
   10 |   for(i=0;i<a.size();i++){
      |       ^
a.cc:12:15: error: expected ';' before '}' token
   12 |       count ++
      |               ^
      |               ;
   13 |     }
      |     ~
Language: C++

#include <iostream>
using namespace std;
int main(){
  int cout = 0;
  vector<int> s(3);
  for (int i = 0; i < 3; i++){
    cin >> s.at(i);
  }
  for (int i = 0; i < 3; i++){
    if (s.at(i) == 1) cout++;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'vector' was not declared in this scope
    5 |   vector<int> s(3);
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:5:10: error: expected primary-expression before 'int'
    5 |   vector<int> s(3);
      |          ^~~
a.cc:7:12: error: 's' was not declared in this scope
    7 |     cin >> s.at(i);
      |            ^
a.cc:10:9: error: 's' was not declared in this scope
   10 |     if (s.at(i) == 1) cout++;
      |         ^
Language: C++

#include <iostream>
#include<string>
using namespace std;
int main(){
  int c;
  string s;
  cin>>s;
  if(s[0]=="1")c++;
  if(s[1]=="1")c++;
  if(s[2]=="1")c++;
  cout<<c<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |   if(s[0]=="1")c++;
a.cc:9:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   if(s[1]=="1")c++;
a.cc:10:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   if(s[2]=="1")c++;
Language: C++

#include <iostream>
#include<string>
using namespace std;
int main(){
  int c;
  stirng s;
  cin>>s;
  if(s[0]=="1")c++;
  if(s[1]=="1")c++;
  if(s[2]=="1")c++;
  cout<<c<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'stirng' was not declared in this scope
    6 |   stirng s;
      |   ^~~~~~
a.cc:7:8: error: 's' was not declared in this scope
    7 |   cin>>s;
      |        ^
Language: C++

#include <iostream>

using namespace std;

int main(){
  string s;
  cin >> s;
  
  int count = 0;
  for(int i=0; i<s.size(); i++){
    if(s[i] == "1"){
      count++;
    }
  }
  cout << count;
  
}

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