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

        #include<stdio.h>
        int main()
        {
            int a = 0;
            char s[];
          
            // スペース区切りの整数の入力
            if(s[0] == 1){
             a++;
            }
           if(s[1] == 1){
             a++;
            }
           if(s[2] == 1){
             a++;
           }
          printf("%d", &a);
          
          return 0;
        }

Compiler output:
main.c: In function 'main':
main.c:5:18: error: array size missing in 's'
    5 |             char s[];
      |                  ^
Language: C

        #include<stdio.h>
        int main()
        {
            int a = 0;
            char s;
          
            // スペース区切りの整数の入力
            if(s[0] == 1){
             a++;
            }
           if(s[1] == 1){
             a++;
            }
           if(s[2] == 1){
             a++;
            }

Compiler output:
main.c: In function 'main':
main.c:8:17: error: subscripted value is neither array nor pointer nor vector
    8 |             if(s[0] == 1){
      |                 ^
main.c:11:16: error: subscripted value is neither array nor pointer nor vector
   11 |            if(s[1] == 1){
      |                ^
main.c:14:16: error: subscripted value is neither array nor pointer nor vector
   14 |            if(s[2] == 1){
      |                ^
main.c:16:13: error: expected declaration or statement at end of input
   16 |             }
      |             ^
Language: C

        #include<stdio.h>
        int main()
        {
            int a = 0;
            string s[];
            // スペース区切りの整数の入力
            if(s[0] == 1){
             a++;
            }
           if(s[1] == 1){
             a++;
            }
           if(s[2] == 1){
             a++;
            }
         
            // 出力
            printf("%d\n",a);
            return 0;
        }

Compiler output:
main.c: In function 'main':
main.c:5:13: error: unknown type name 'string'; did you mean 'stdin'?
    5 |             string s[];
      |             ^~~~~~
      |             stdin
main.c:5:20: error: array size missing in 's'
    5 |             string s[];
      |                    ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'String' was not declared in this scope
    7 |   String s;
      |   ^~~~~~
a.cc:9:3: error: expected ',' or ';' before 'cin'
    9 |   cin >> s;
      |   ^~~
a.cc:10:6: error: 's' was not declared in this scope
   10 |   if(s[0]=="1")c++;
      |      ^
a.cc:11:6: error: 's' was not declared in this scope
   11 |   if(s[1]=="1")c++;
      |      ^
a.cc:12:6: error: 's' was not declared in this scope
   12 |   if(s[2]=="1")c++;
      |      ^
Language: C++

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

int main(){
  string s;
  cin>>s;
  
  int count = 0;
  
  if(s.at(0) == '1') count++:
  if(s.at(1) == '1') count++;
  if(s.at(2) == '1') count++;
  
  cout<<count<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:29: error: expected ';' before ':' token
   11 |   if(s.at(0) == '1') count++:
      |                             ^
      |                             ;
Language: C++

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


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

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

int main() {

  int a, b;
  cin >> a >> b >> c ;
    cout << a+b+c ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: 'c' was not declared in this scope
    7 |   cin >> a >> b >> c ;
      |                    ^
Language: Java

import java.util.Scanner;

class Main {
  public static void main(String[] args) {
    int ans; 
    Scanner sc = new Scanner(System.in);
    String s = sc.nextln();
    if(s[0]=='1') {ans++;}
    if(s[1]=='1') {ans++;}
    if(s[2]=='1') {ans++;}
    System.out.println(ans);
  }
}


Compiler output:
Main.java:7: error: cannot find symbol
    String s = sc.nextln();
                 ^
  symbol:   method nextln()
  location: variable sc of type Scanner
Main.java:8: error: array required, but String found
    if(s[0]=='1') {ans++;}
        ^
Main.java:9: error: array required, but String found
    if(s[1]=='1') {ans++;}
        ^
Main.java:10: error: array required, but String found
    if(s[2]=='1') {ans++;}
        ^
4 errors
Language: Java

import java.util.Scanner;

class Main {
  public static void main(String[] args) {
    int ans; 
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    if(s[0]=='1') {ans++;}
    if(s[1]=='1') {ans++;}
    if(s[2]=='1') {ans++;}
    System.out.println(ans);
  }
}


Compiler output:
Main.java:8: error: array required, but String found
    if(s[0]=='1') {ans++;}
        ^
Main.java:9: error: array required, but String found
    if(s[1]=='1') {ans++;}
        ^
Main.java:10: error: array required, but String found
    if(s[2]=='1') {ans++;}
        ^
3 errors
Language: Java

import java.util.Scanner;

class Main {
  public static void main(String[] args) {
    int ans; 
    Scanner sc = new.Scanner(System.in);
    String s = sc.next();
    if(s[0]=='1') {ans++;}
    if(s[1]=='1') {ans++;}
    if(s[2]=='1') {ans++;}
    System.out.println(ans);
  }
}


Compiler output:
Main.java:6: error: <identifier> expected
    Scanner sc = new.Scanner(System.in);
                    ^
1 error
Language: Java

import java.util.Scanner;

class Main {
  public static void main(String[] args) {
    
    Scanner sc = new Scanner(System.in);
    
    int s1 = sc.nextInt();
    int s2 = sc.nextInt();
    int s3 = sc.nextInt();
    
    int ans;
    if(s1 == 1) {
      ans++;
    }
    if(s2 == 1) {
      ans++;
    }
    if(s3 == 1) {
      ans++;
    }
    
    System.out.println(ans);
  }
}
    


Compiler output:
Main.java:14: error: variable ans might not have been initialized
      ans++;
      ^
Main.java:17: error: variable ans might not have been initialized
      ans++;
      ^
Main.java:20: error: variable ans might not have been initialized
      ans++;
      ^
Main.java:23: error: variable ans might not have been initialized
    System.out.println(ans);
                       ^
4 errors
Language: Java

import java.util.Scanner;

class Main {
  public static void main(String[] args) {
    
    Scanner sc = new.Scanner(System.in);
    
    int s1 = sc.nextInt();
    int s2 = sc.nextInt();
    int s3 = sc.nextInt();
    
    int ans;
    if(s1 == 1) {
      ans++;
    }
    if(s2 == 1) {
      ans++;
    }
    if(s3 == 1) {
      ans++;
    }
    
    System.out.println(ans);
  }
}
    

Compiler output:
Main.java:6: error: <identifier> expected
    Scanner sc = new.Scanner(System.in);
                    ^
1 error
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: expected ',' or ';' before 'if'
   11 |   if(s.at(0)=="1") c++;
      |   ^~
a.cc:12:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |   if(s.at(1)=="1") c++;
      |      ~~~~~~~^~~~~
a.cc:13:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |   if(s.at(2)=="1") c++;
      |      ~~~~~~~^~~~~
Language: C++

#include <bits/stdc++.h>
using namepace std;
 
int main() {
  string s;
  cin >> s;
  
  int c=0;
  for(int i=0,i<2,i++){
    if(S.at(i)=="1"){
      c++;
    }
    
    else{
      continue;
    }
    
  }
  
  cout << c <<endl;
      
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namepace'
    2 | using namepace std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string s;
      |   ^~~~~~
a.cc:5:3: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> s;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:10: error: 's' was not declared in this scope
    6 |   cin >> s;
      |          ^
a.cc:9:16: error: expected ';' before '<' token
    9 |   for(int i=0,i<2,i++){
      |                ^
      |                ;
a.cc:9:16: error: expected primary-expression before '<' token
a.cc:9:22: error: expected ';' before ')' token
    9 |   for(int i=0,i<2,i++){
      |                      ^
      |                      ;
a.cc:10:8: error: 'S' was not declared in this scope
   10 |     if(S.at(i)=="1"){
      |        ^
a.cc:20:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   20 |   cout << c <<endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:20:15: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   20 |   cout << c <<endl;
      |               ^~~~
      |               std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  string S
  cin >> S;
  
  int s=0;
  for(int i=0,i<2,i++){
    if(S.at(i)=="1"){
      s++;
    }
    
    else{
      continue;
    }
    
  }
  
  cout << s <<endl;
      
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'cin'
    6 |   cin >> S;
      |   ^~~
a.cc:9:16: error: expected ';' before '<' token
    9 |   for(int i=0,i<2,i++){
      |                ^
      |                ;
a.cc:9:16: error: expected primary-expression before '<' token
a.cc:9:22: error: expected ';' before ')' token
    9 |   for(int i=0,i<2,i++){
      |                      ^
      |                      ;
a.cc:10:8: error: 'S' was not declared in this scope
   10 |     if(S.at(i)=="1"){
      |        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main{
  string S;
  cin >> S;
  
  int s=0;
  for(int i=0,i<2,i++){
    if(S.at(i)=="1"){
      s++;
    }
    
    else{
      continue;
    }
    
  }
  
  cout << s <<endl;
      
}

Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:5:10: error: expected primary-expression before 'S'
    5 |   string S;
      |          ^
a.cc:5:10: error: expected '}' before 'S'
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:6:3: error: 'cin' does not name a type
    6 |   cin >> S;
      |   ^~~
a.cc:9:3: error: expected unqualified-id before 'for'
    9 |   for(int i=0,i<2,i++){
      |   ^~~
a.cc:20:3: error: 'cout' does not name a type
   20 |   cout << s <<endl;
      |   ^~~~
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Language: C++

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

int main{
  string S;
  cin >> S;
  
  int s=0;
  for(int i=0,i<2,i++){
    if(S.at(i)=="1"){
      s++;
    }
    
    else{
      continue;
    }
    
  }
  
  cout << s <<endl;
      
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namepace'
    2 | using namepace std;
      |       ^~~~~~~~
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string S;
      |   ^~~~~~
a.cc:5:3: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:5:10: error: expected '}' before 'S'
    5 |   string S;
      |          ^
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:6:3: error: 'cin' does not name a type
    6 |   cin >> S;
      |   ^~~
a.cc:9:3: error: expected unqualified-id before 'for'
    9 |   for(int i=0,i<2,i++){
      |   ^~~
a.cc:20:3: error: 'cout' does not name a type
   20 |   cout << s <<endl;
      |   ^~~~
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

int main() {
  int n, a[210], c=0;
  cin >> n;
  for(int i = 0; i < n; i++) cin >> a[i];
  while(true) {
    if(a[i] % 2 == 0){
     	a[i] /= 2;
    }else{
    	cout << c << endl;
      	return 0;
    }
    c++;
  }
  cout << c << endl;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: 'i' was not declared in this scope
    9 |     if(a[i] % 2 == 0){
      |          ^
Language: C++

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

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


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

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

int main()
{
  int s, cnt;
  cin >> s;
  
  for (int i = 0; i < 3; i++) {
	if (s % 10 != 0) {
      cnt++;
    }
    s /= 10;
  }
  
  cout << cnt << endl;
}

Compiler output:
a.cc:1:25: error: missing terminating > character
    1 | #include <bits/stdc++.h+
      |                         ^
a.cc: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() {
  int s1,s2,s3;
  cin >> s1 >> s2 >> s3;
  int i=0
    if(s1 == 1){
      i++
    }
  if(s2 == 1)
  {
    i++
  }
  if(s3 == 1)
  {
    i++
  }
  cout << i <<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected ',' or ';' before 'if'
    8 |     if(s1 == 1){
      |     ^~
a.cc:13:8: error: expected ';' before '}' token
   13 |     i++
      |        ^
      |        ;
   14 |   }
      |   ~     
a.cc:17:8: error: expected ';' before '}' token
   17 |     i++
      |        ^
      |        ;
   18 |   }
      |   ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int s1,s2,s3;
  cin >> s1 >> s2 >> s3;
  int i=0
    if(s1 == 1){
      i++
    }
  if(s2 == !)
  {
    i++
  }
  if(s3 == 1)
  {
    i++
  }
  cout << i <<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected ',' or ';' before 'if'
    8 |     if(s1 == 1){
      |     ^~
a.cc:11:13: error: expected primary-expression before ')' token
   11 |   if(s2 == !)
      |             ^
a.cc:13:8: error: expected ';' before '}' token
   13 |     i++
      |        ^
      |        ;
   14 |   }
      |   ~     
a.cc:17:8: error: expected ';' before '}' token
   17 |     i++
      |        ^
      |        ;
   18 |   }
      |   ~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: request for member 'at' in 's', which is of non-class type 'int'
   10 |     if(s.at(i) == 1) count++;
      |          ^~
Language: Java

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] s = sc.nextLine().split("");

        int count=0;
        for (int i = 0; i < s.length; i++) {
            if (Integer.parseInt(s[i])==1) {
                count++;
            }
        }
        System.out.println(count);
    }
}

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

#include <iostream>
using namespace std;
int N;
int A[210];

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

Compiler output:
a.cc: In function 'int main()':
a.cc:17:30: error: expected ';' before '}' token
   17 |                 A[i] = A[i]/2
      |                              ^
      |                              ;
   18 |                 }
      |                 ~             
a.cc:19:22: error: expected ';' before '}' token
   19 |                 ++res
      |                      ^
      |                      ;
   20 |                 }
      |                 ~     
a.cc:22:2: error: expected '}' at end of input
   22 | }
      |  ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(void){
  char s[3];
  int count=0;
  scanf("%s",s);
  for(int i=0;i<3;i++){
    if(s.at(i)=='1'){
      count++;
    }
  }
  printf("%d",count);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: request for member 'at' in 's', which is of non-class type 'char [3]'
    8 |     if(s.at(i)=='1'){
      |          ^~
Language: C++

#include <cstudio>;
using namespace std;

int main(){
  string s;
  
  cin >> s;
  
  String[] one = s.split("1", -1);
  
  cout << sizeof(one);
}


Compiler output:
a.cc:1:19: warning: extra tokens at end of #include directive
    1 | #include <cstudio>;
      |                   ^
a.cc:1:10: fatal error: cstudio: No such file or directory
    1 | #include <cstudio>;
      |          ^~~~~~~~~
compilation terminated.
Language: C++

#include <cstudio>
using namespace std;

int main(){
  string s;
  
  cin >> s;
  
  String[] one = s.split("1", -1);
  
  cout << sizeof(one);
}


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

#include <iostream>
using namespace std;

int main(){
  string s;
  
  cin >> s;
  
  String[] one = s.split("1", -1);
  
  cout << sizeof(one);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'String' was not declared in this scope
    9 |   String[] one = s.split("1", -1);
      |   ^~~~~~
a.cc:9:10: error: expected primary-expression before ']' token
    9 |   String[] one = s.split("1", -1);
      |          ^
a.cc:11:18: error: 'one' was not declared in this scope
   11 |   cout << sizeof(one);
      |                  ^~~
Language: Java

import java.util.Scanner;
 
class Main{
 public static void main(String args[]){
   Scanner sc = new Scanner(System.in);
   int count = 0;
   
   String str = sc.next();
   
   // 1文字ずつ判定
   for(int i=0; i<str.length; i++){
   
    // 1のカウント
    if("1".equals(str.charAt(i))){
      count++;
    }
   }
   
   // 1のカウントを出力
   System.out.println(count);
 }
}

Compiler output:
Main.java:11: error: cannot find symbol
   for(int i=0; i<str.length; i++){
                     ^
  symbol:   variable length
  location: variable str of type String
1 error
Language: Java

import java.util.Scanner;
 
class Main{
 public static void main(String args[]){
   Scanner sc = new Scanner(System.in);
   int count = 0;
   
   String x = sc.next();
   
   // 1文字ずつ判定
   for(int i=0; i<3; i++){
   
    // 1のカウント
    if("1".equals(x[i])){
      count++;
    }
   }
   
   // 1のカウントを出力
   System.out.println(count);
 }
}

Compiler output:
Main.java:14: error: array required, but String found
    if("1".equals(x[i])){
                   ^
1 error
Language: Java

import java.util.Scanner;
 
class Main{
 public static void main(String args[]){
   Scanner sc = new Scanner();
   int count = 0;
   
   // 1文字ずつint型で受け取る
   for(int i=0; i<3; i++){
   	int x = sc.nextInt();
    // 1のカウント
    if(x == 1){
      count++;
    }
   }
   
   // 1のカウントを出力
   System.out.println(count);
 }
}

Compiler output:
Main.java:5: error: no suitable constructor found for Scanner(no arguments)
   Scanner sc = new Scanner();
                ^
    constructor Scanner.Scanner(Readable,Pattern) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Readable) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(InputStream) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(InputStream,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(InputStream,Charset) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File,Charset) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File,CharsetDecoder) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Path) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Path,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Path,Charset) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(ReadableByteChannel) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(ReadableByteChannel,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(ReadableByteChannel,Charset) is not applicable
      (actual and formal argument lists differ in length)
1 error
Language: Java

import java.util.Scanner;

class Main{
 public static void main(String args[]){
   Scanner sc = new Scanner();
   int count = 0;
   
   // 1文字ずつint型で受け取る
   for(int i=0; i<3; i++){
   	int x = sc.nextInt();
    // 1のカウント
    if(x == 1){
      count++
    }
   }
   
   // 1のカウントを出力
   System.out.println(count);
 }
}

Compiler output:
Main.java:13: error: ';' expected
      count++
             ^
1 error
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:7:1: error: expected declaration before '}' token
    7 | }
      | ^
Language: C++

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

int main() {
  int s1, s2, s3, x;
  cin >> x;
  s1 = x/100;
  s2 = (x%100)/10;
  s3 = x%10;
  cout << s1+s2+s3 << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:10:28: error: expected '}' at end of input
   10 |   cout << s1+s2+s3 << endl;
      |                            ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:28: error: expected ';' before '}' token
   10 |   cout << a + b + c << endl
      |                            ^
      |                            ;
   11 | }
      | ~
Language: C

#include <stdio.h>
#include <string>
 
int main(void) {
string s;
scanf("%s",s);
int x = 0;
if(s[0] == 1){
x = x+1;
}
if(s[1] == 1){
x = x+1;
}
if(s[2] == 1){
x = x+1;
}
printf("%d",x);
}

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

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

int main () {
  int A, a100, a10, a1;
  cin >> A;
  a100 = A / 100;
  a10 = (A - a100) / 10;
  a1 = (A - a100 - a10);
  cout << a100 + a10 + a1 <<endl;
}

Compiler output:
a.cc:1:10: 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(){
  int s
  cin >> s;
  switch(s){
    case 111:
      cout << 3;
      break;
    case 110:
      cout << 2;
      break;
    case 101:
      cout << 2;
      break;
    case 100:
      cout << 1;
      break;
    case 011 :
      cout << 2;
      break;
    case 010:
      cout << 1;
      break;
    case 001:
      cout << 1;
      break;
    case 000:
      cout << 0;
      break;
    default:
      cout << 0;
  }
  return 0;
}
      
      
      

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: expected initializer before 'cin'
    5 |   cin >> s;
      |   ^~~
a.cc:6:10: error: 's' was not declared in this scope
    6 |   switch(s){
      |          ^
Language: C++

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

int main(){
  
  int s1,s2,s3,ans;
  
  ans=0
  
  cin >> s1 >> s2 >> s3 ;
  
  if (s1 == 1){
    ans=ans+1;
  }
  
  if (s2 == 1){
    ans=ans+1;
  }
  
  if (s3 == 1) {
    ans=ans+1;
  }
  
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: expected ';' before 'cin'
    8 |   ans=0
      |        ^
      |        ;
    9 | 
   10 |   cin >> s1 >> s2 >> s3 ;
      |   ~~~
Language: C

#define warn_unused_result
#include <stdio.h>
 
 
int main(){
  char s[3];
  int sum, i;  
  scanf("%s", s);
  
  for(i=0;i>3;i++){
    if(s[i] == "1"){
      sum = sum + 1;
    }
  }
  

Compiler output:
main.c: In function 'main':
main.c:11:13: warning: comparison between pointer and integer
   11 |     if(s[i] == "1"){
      |             ^~
main.c:14:3: error: expected declaration or statement at end of input
   14 |   }
      |   ^
Language: C

#include <stdio.h>
#define warn_unused_result

int main(){
  char s[3];
  int sum, i;  
  scanf("%s", s);
  
  for(i=0;i>3;i++){
    if(char[i] == 1){
      sum = sum + 1;
    }
  }
  
  printf("%d", sum);
  
  return 0;
}

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

#include <stdio.h>

int main(){
  char s[3];
  int sum, i;  
  scanf("%s", s);
  
  for(i=0;i>3;i++){
    if(char[i] == 1){
      sum = sum + 1;
    }
  }
  
  printf("%d", sum);
  
  return 0;
}

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

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

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

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

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

#include <bits/stdc++.h>
using namespace std;
int main(){
  int input;
  cin >> input;
  int result = input % 100 + input / 10 % 10 + input /100 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: expected ',' or ';' before '}' token
    7 | }
      | ^
Language: C++

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


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

#include <bits/stdc++.h>
using namespace std;
  
int main() {
  int s1, s2, s3;
  cin >> s1
  cin >> s2
  cin >> s3
  cout << s1 + s2 + s3 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: expected ';' before 'cin'
    6 |   cin >> s1
      |            ^
      |            ;
    7 |   cin >> s2
      |   ~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int count1(char* my_str){
    int i, count = 0;
    for(i = 0;my_str[i]!='\0';i++){
        if(my_str[i] == '1'){
            count++;
        }
    }
    return count;
}
int main() {
  // ここにプログラムを追記
  string a;
  cin >> a;
  cout << count1(a) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:18: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'char*'
   16 |   cout << count1(a) << endl;
      |                  ^
      |                  |
      |                  std::string {aka std::__cxx11::basic_string<char>}
a.cc:3:18: note:   initializing argument 1 of 'int count1(char*)'
    3 | int count1(char* my_str){
      |            ~~~~~~^~~~~~
Language: C++

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

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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a;
  int s_1;
  int s_2;
  int s_3;
  cin >> a;
  s_3 = a%10;
  s_2 = ((a - s_3)%100)/10;
  s_1 = ((a-s_2*10-s_3)%1000)/100
  cout << s_1+s_2+s_3 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:34: error: expected ';' before 'cout'
   12 |   s_1 = ((a-s_2*10-s_3)%1000)/100
      |                                  ^
      |                                  ;
   13 |   cout << s_1+s_2+s_3 << endl;
      |   ~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int s1,s2,s3 ;
  s1=s2=s3=0or1;
  cin >> s1 >> s2 >> s3 ;
  cout << s1 + s2 + s3 << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: unable to find numeric literal operator 'operator""or1'
    5 |   s1=s2=s3=0or1;
      |            ^~~~
a.cc:7:32: error: expected '}' at end of input
    7 |   cout << s1 + s2 + s3 << endl;
      |                                ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C++

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

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


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

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

int main(){
 string s;
  cin >>s;
  int x=0;
  if(s.at(0) == "1")x++;
  if(s.at(1) == "1")x++;
  if(s.at(2) == "1")x++;
  
  cout << x <<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.at(0) == "1")x++;
      |      ~~~~~~~~^~~~~~
a.cc:9:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   if(s.at(1) == "1")x++;
      |      ~~~~~~~~^~~~~~
a.cc:10:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   if(s.at(2) == "1")x++;
      |      ~~~~~~~~^~~~~~
Language: C++

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

int main(void){
 string s;
  cin >>s.at(0)>>s.at(1)>>s.at(2);
  int x=0;
  if(s.at(0) == "1")x++;
  if(s.at(1) == "1")x++;
  if(s.at(2) == "1")x++;
  
  cout << x <<endl;
  
return 0;
}


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.at(0) == "1")x++;
      |      ~~~~~~~~^~~~~~
a.cc:9:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   if(s.at(1) == "1")x++;
      |      ~~~~~~~~^~~~~~
a.cc:10:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   if(s.at(2) == "1")x++;
      |      ~~~~~~~~^~~~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
  vector<int> vec(3);
  int x =0;
  for(int i=0;i<3;i++){
  cin >> vec.at(i);
  if(vec.at(i)==1)x++
  }

  cout << x <<endl;
  
  
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'vector' was not declared in this scope
    5 |   vector<int> vec(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> vec(3);
      |          ^~~
a.cc:8:10: error: 'vec' was not declared in this scope
    8 |   cin >> vec.at(i);
      |          ^~~
a.cc:9:22: error: expected ';' before '}' token
    9 |   if(vec.at(i)==1)x++
      |                      ^
      |                      ;
   10 |   }
      |   ~
Language: C++

#include <iostream>
using namespace std;

int main(){
  bool a,b,c;
  cin a >> b >> c;
  int x=0;
  if(a)x++;
  if(b)x++;
  if(c)x++;
  cout <<x<<endl; 
  
  
  
return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
 
int main()
{
	double a b;
    int c ;
	cin >> a  ;
  	b = 0 ;
   	b += a / 100 ;
  	b += a / 10 ;
  	c = b ;
  	cout << c << endl ;
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:18: error: expected initializer before 'b'
    6 |         double a b;
      |                  ^
a.cc:8:16: error: 'a' was not declared in this scope
    8 |         cin >> a  ;
      |                ^
a.cc:9:9: error: 'b' was not declared in this scope
    9 |         b = 0 ;
      |         ^
Language: C++

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

int main()
{
	double a ;
    int c ;
	cin >> a  ;
  	c = 0 ;
   	c += a / 100 ;
  	c += a / 10
  	cout << 3 - c << endl ;
  	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:20: error: expected ';' before 'cout'
   11 |         c += a / 10
      |                    ^
      |                    ;
   12 |         cout << 3 - c << endl ;
      |         ~~~~
Language: C++

using namespace std;

int main() {
	int s, ans;
	for (int i = 0; i < 3; i++) {
		cin >> s;
		if (s == 1) {
			ans++;
		}
	}
	cout << ans << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: 'cin' was not declared in this scope
    6 |                 cin >> s;
      |                 ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:11:9: error: 'cout' was not declared in this scope
   11 |         cout << ans << endl;
      |         ^~~~
a.cc:11:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:24: error: 'endl' was not declared in this scope
   11 |         cout << ans << endl;
      |                        ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int abc;
  cin >> abc;
  cout << a + b + c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: 'a' was not declared in this scope
    7 |   cout << a + b + c << endl;
      |           ^
a.cc:7:15: error: 'b' was not declared in this scope
    7 |   cout << a + b + c << endl;
      |               ^
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() {
  int abc;
  cin >> abc;
  cout << a + b + c << endl;
}

Compiler output:
a.cc: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;

signed main(){
 
  int n;
  cin>>n;
  
  cout<<n%3+n?3:0<<endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    9 |   cout<<n%3+n?3:0<<endl;
      |                 ~^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int R,G,a;
  G=R%10
  a=R%100
  cin>>R;
  cout<<R/100+G/10+a<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: expected ';' before 'a'
    6 |   G=R%10
      |         ^
      |         ;
    7 |   a=R%100
      |   ~
Language: C++

#include <bits/stdc++.h>
#include <math.h>
#define REP(i, n) for(int i = 0; i < (n); i++)
#define ALL(v) (v).begin(), (v).end()
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1001001001;
const int mINF = -1001001001;


int main() {
char s[3]
int ans=0;
cin >> s;
REP(i,3) {
  if(s[i]==1) ans++;
}
cout << ans << endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:1: error: expected initializer before 'int'
   14 | int ans=0;
      | ^~~
a.cc:15:8: error: 's' was not declared in this scope
   15 | cin >> s;
      |        ^
a.cc:17:15: error: 'ans' was not declared in this scope; did you mean 'abs'?
   17 |   if(s[i]==1) 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() {
  vector<int> vec(3);
for (int i = 0; i < 3; i++) {
  cin >> vec.at(i);
}
  int N = 0;
for (int i = 0; i < 3; i++){
  if(vec.at(1) == 1){
    N++
  }
}
cout << N << endl;    
}


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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:31: error: expected ';' before '}' token
   10 |     if (s[i] == '1') ++counter
      |                               ^
      |                               ;
   11 |   }
      |   ~
Language: C++

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

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

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

#include<iostream>
using namespace std;

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

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

#include<iostream>
using namespace std;

int main(){
  string s ;
  cin >> s;
  int count = 0
  for (int i = 0; i < 3; ++i) ++count;
  cout << count <<endl;
}

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

#include<iostream>
using namespace std;

int main(){
  string s ;
  cin >> s;
  int count = 0
  for (int i = 0; i < N; ++i){
    count++;
  }
  cout << count <<endl;
}

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

#include<iostream>
using namespace std;

int main(){
  string s ;
  cin >> s;
  int count = 0
  for (int i = 0; i < 3 ; ++i ){
    count++;
  }
  cout << count <<endl;
}

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

#include<iostream>
using namespace std;

int main(){
  string s ;
  cin >> s;
  int count = 0
  for (int i = 0; i < 3 ; ++i ){
    count++
  }
  cout << count <<endl;
}

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

#include<iostream>
using namespace std;

int main(){
  string s ;
  cin >> s;
  count = 0
  for (int i = 0; i < 3 ; ++i ){
    count++
  }
  cout << count <<endl;
}

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

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

int main() {
  int s1s2s3;
  cin >> s1s2s3;
  cout << s1s2s3%10+(s1s2s3-s1s2s3%10)/10%10+((s1s2s3-s1s2s3s%10)-(s1s2s3-s1s2s3%10)/10%10)/10<< endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:55: error: 's1s2s3s' was not declared in this scope; did you mean 's1s2s3'?
    7 |   cout << s1s2s3%10+(s1s2s3-s1s2s3%10)/10%10+((s1s2s3-s1s2s3s%10)-(s1s2s3-s1s2s3%10)/10%10)/10<< endl;
      |                                                       ^~~~~~~
      |                                                       s1s2s3
Language: C++

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

int main(){
    int N, counter=0;
    cin >> N;
    vector<int> A(N);
    for (int i=0; i < N; i++) {cin >> A[i];}

    while(true){
        
        bool exist_odd = false; 
        for (int x=0; x!=A.size(); ++x)) {
             if (x%2 != 0) {exist_odd = true;}
             }
        
        if (exist_odd) break;  // 奇数があったら break

        // 操作を行えるなら操作を実際に行う
        for (int i = 0; i < N; ++i) {
            A[i] /= 2;
        }
        ++counter;  // 操作回数をインクリメント
    }
    cout << counter << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:40: error: expected primary-expression before ')' token
   14 |         for (int x=0; x!=A.size(); ++x)) {
      |                                        ^
Language: C++

#include <iostream>
using namespace std;

int main(){
    int N, counter=0;
    cin >> N;
    vector<int> A(N);
    for (int i=0; i < N; i++) cin >> A.at(i);
    
    for (int x : A) {
        while (x%2 == 0) {
            x /= 2;
            counter++;
        }
    
    cout << counter << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'vector' was not declared in this scope
    7 |     vector<int> A(N);
      |     ^~~~~~
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:7:12: error: expected primary-expression before 'int'
    7 |     vector<int> A(N);
      |            ^~~
a.cc:8:38: error: 'A' was not declared in this scope
    8 |     for (int i=0; i < N; i++) cin >> A.at(i);
      |                                      ^
a.cc:10:18: error: 'A' was not declared in this scope
   10 |     for (int x : A) {
      |                  ^
Language: C++

#include <iostream>
using namespace std;

int main(){
    int N, counter=0;
    cin >> N;
    vector<int> A(N);
    for (int i=0; i < N; i++) cin >> A.at(i);
    
    for (int x : A) {
        while (x%2 == 0) {
            x /= 2;
            counter++;
        }
    
    cout << counter << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'vector' was not declared in this scope
    7 |     vector<int> A(N);
      |     ^~~~~~
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:7:12: error: expected primary-expression before 'int'
    7 |     vector<int> A(N);
      |            ^~~
a.cc:8:38: error: 'A' was not declared in this scope
    8 |     for (int i=0; i < N; i++) cin >> A.at(i);
      |                                      ^
a.cc:10:18: error: 'A' was not declared in this scope
   10 |     for (int x : A) {
      |                  ^
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^