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

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

int main() {
  int s1;
  int s2;
  int s3;
  cin>>s1>>s2>>s3;
  int e;
    e=S1+s2+s3;
  cout<<e<<endl;
}








Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: 'S1' was not declared in this scope; did you mean 's1'?
   10 |     e=S1+s2+s3;
      |       ^~
      |       s1
Language: C++

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

int main() {
  int s1;
  int s2;
  int s3;
  cin>>s1>>s2>>s3;
  int e=S1+s2+s3;
  cout<<e<<endl;
}







Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'S1' was not declared in this scope; did you mean 's1'?
    9 |   int e=S1+s2+s3;
      |         ^~
      |         s1
Language: C++

#include <iostream>
#include <string>
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:19: error: expected initializer before '\U0000ff1d'
    8 |       int counter ＝ 0;
      |                   ^~
a.cc:9:25: error: 'counter' was not declared in this scope
    9 |       if(s[0] == '1') ++counter;
      |                         ^~~~~~~
a.cc:10:25: error: 'counter' was not declared in this scope
   10 |       if(s[1] == '1') ++counter;
      |                         ^~~~~~~
a.cc:11:25: error: 'counter' was not declared in this scope
   11 |       if(s[2] == '1') ++counter;
      |                         ^~~~~~~
a.cc:12:15: error: 'counter' was not declared in this scope
   12 |       cout << counter << endl;
      |               ^~~~~~~
Language: C++

#include <iostream>
#include <string>
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:19: error: expected initializer before numeric constant
    8 |       int counter 0;
      |                   ^
a.cc:9:25: error: 'counter' was not declared in this scope
    9 |       if(s[0] == '1') ++counter;
      |                         ^~~~~~~
a.cc:10:25: error: 'counter' was not declared in this scope
   10 |       if(s[1] == '1') ++counter;
      |                         ^~~~~~~
a.cc:11:25: error: 'counter' was not declared in this scope
   11 |       if(s[2] == '1') ++counter;
      |                         ^~~~~~~
a.cc:12:15: error: 'counter' was not declared in this scope
   12 |       cout << counter << endl;
      |               ^~~~~~~
Language: C++

#include <iostream>
#include <string>
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;
      count << counter << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: expected initializer before numeric constant
    8 |       int counter 0;
      |                   ^
a.cc:9:25: error: 'counter' was not declared in this scope
    9 |       if(s[0] == '1') ++counter;
      |                         ^~~~~~~
a.cc:10:25: error: 'counter' was not declared in this scope
   10 |       if(s[1] == '1') ++counter;
      |                         ^~~~~~~
a.cc:11:25: error: 'counter' was not declared in this scope
   11 |       if(s[2] == '1') ++counter;
      |                         ^~~~~~~
a.cc:12:7: error: 'count' was not declared in this scope
   12 |       count << counter << endl;
      |       ^~~~~
a.cc:12:16: error: 'counter' was not declared in this scope
   12 |       count << counter << endl;
      |                ^~~~~~~
Language: C++

#include <iostream>
#include <string>
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;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: expected initializer before numeric constant
    8 |       int counter 0;
      |                   ^
a.cc:9:25: error: 'counter' was not declared in this scope
    9 |       if(s[0] == '1') ++counter;
      |                         ^~~~~~~
a.cc:10:25: error: 'counter' was not declared in this scope
   10 |       if(s[1] == '1') ++counter;
      |                         ^~~~~~~
a.cc:11:25: error: 'counter' was not declared in this scope
   11 |       if(s[2] == '1') ++counter;
      |                         ^~~~~~~
Language: C++

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


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

#include<stdio.h>
int main(void){
    int s1s2s3;
    scanf("%d",s1s2s3);
    if(s1s2s3 - 100 == 1){
        count ++;
    }
    if(s1s2s3 - 10 >= 100){
        count ++;
    }
    if(s1s2s3 - 12 >= 100){
        count ++;
    }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: 'count' undeclared (first use in this function)
    6 |         count ++;
      |         ^~~~~
main.c:6:9: 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() {
  string a;
  cin >> a;
  int ans = 0;
  for (i = 0; i < 3; i++) {
    if (a.at(i) == '1') {
      ans++;
    }
  }
  cout << ans << endl;
}
      

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

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

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: 'i' was not declared in this scope
    8 |   for (i = 0; i < 3; i++) {
      |        ^
a.cc:9:11: error: request for member 'at' in 'a', which is of non-class type 'int'
    9 |     if (a.at(i) = 1) {
      |           ^~
Language: C++

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

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

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

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

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


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

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

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

  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: expected initializer before 'c'
    8 |   int counter c = 0;
      |               ^
a.cc:9:18: error: 'c' was not declared in this scope
    9 |   if (s[0] == 1) c++;
      |                  ^
a.cc:10:18: error: 'c' was not declared in this scope
   10 |   if (s[1] == 1) c++;
      |                  ^
a.cc:11:18: error: 'c' was not declared in this scope
   11 |   if (s[2] == 1) c++;
      |                  ^
a.cc:13:11: error: 'c' was not declared in this scope
   13 |   cout << c << endl;
      |           ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(){
  
  int s1;
  int s2;
  int s3;
  
  cin >> s1;
  cin >> s2;
  cin >> s3;
  
  cout<< s1 + s2 + s3 <<endl;

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: two or more data types in declaration of 'i'
    9 |     for (auto int i = 0; i < a.size(); i++) {
      |          ^~~~
a.cc:9:26: error: 'i' was not declared in this scope
    9 |     for (auto int i = 0; i < a.size(); i++) {
      |                          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  // ここにプログラムを追記
int a,b;
  cin >> a >> b >> c;
    cout <<a + b + c <<endl;
}

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: C++

#include<iostream>
using namespace std;
int main(){
  int a, b, c, sum;
  cin >>a>>b>>c;
  if (a==1){
    sum++
  }
  if (b==1){
    sum++
  }
  if (c==1){
    sum++
  }
  cout << sum;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: expected ';' before '}' token
    7 |     sum++
      |          ^
      |          ;
    8 |   }
      |   ~       
a.cc:10:10: error: expected ';' before '}' token
   10 |     sum++
      |          ^
      |          ;
   11 |   }
      |   ~       
a.cc:13:10: error: expected ';' before '}' token
   13 |     sum++
      |          ^
      |          ;
   14 |   }
      |   ~
Language: C++

#include <iostream>
#include <cstdio>
#include <string>
#include <cmath>
#include <vector>
#include <algorithm>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:21: error: 'counr' was not declared in this scope; did you mean 'count'?
   14 |     if(s[i] == '1') counr ++;
      |                     ^~~~~
      |                     count
Language: Java

import java.util.*;

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.lentgh());
	}
}

Compiler output:
Main.java:8: error: cannot find symbol
		System.out.println(s.lentgh());
		                    ^
  symbol:   method lentgh()
  location: variable s of type String
1 error
Language: Java

import java.util.*;

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

Compiler output:
Main.java:8: error: cannot find symbol
		System.out.println(s.lentgh());
		                    ^
  symbol:   method lentgh()
  location: variable s of type String
1 error
Language: Java

import java.util.*;

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

Compiler output:
Main.java:3: error: '{' expected
class Main() {
          ^
1 error
Language: C

#include<stdio.h>

int main(void){
int a,b,c;
int count = 0;
scanf("%d%d%d",&a,&b,&c);
if (a == 1){
count ++
}
if (b == 1){
count ++
}
if (c == 1){
count ++
}
printf("%d",count);

}

Compiler output:
main.c: In function 'main':
main.c:8:9: error: expected ';' before '}' token
    8 | count ++
      |         ^
      |         ;
    9 | }
      | ~        
main.c:11:9: error: expected ';' before '}' token
   11 | count ++
      |         ^
      |         ;
   12 | }
      | ~        
main.c:14:9: error: expected ';' before '}' token
   14 | count ++
      |         ^
      |         ;
   15 | }
      | ~
Language: C++

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

int main()
{
    int s;
    cin >> s;
    int ans=0;
    
    while(s>0){
        ans+=%2;
        s/=10;
    }

    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: expected primary-expression before '%' token
   11 |         ans+=%2;
      |              ^
Language: C++

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

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

#include <iosteram>
#include <string>
using namespace std;
 
int main(){
  string g;
  int count=0;
  cin >> g;
  if(g[0]=="1")count++;
  if(g[1]=="1")count++;
  if(g[2]=="1")count++;
  
  cout << count << endl;
}

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

#include <iosteram>
#include <string>
using namespace std;
 
int main(){
  string g;
  int count;
  cin >> g;
  if(g[0]=="1")count++;
  if(g[1]=="1")count++;
  if(g[2]=="1")count++;
  
  cout << count << endl;
}

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

include <iosteram>
using namespace std;

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

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iosteram>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string g;
      |   ^~~~~~
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> g;
      |   ^~~
a.cc:7:10: error: 'g' was not declared in this scope
    7 |   cin >> g;
      |          ^
a.cc:12:3: error: 'cout' was not declared in this scope; did you mean 'count'?
   12 |   cout << count << endl;
      |   ^~~~
      |   count
a.cc:12:20: error: 'endl' was not declared in this scope
   12 |   cout << count << endl;
      |                    ^~~~
Language: C++

using namespace std;

int main(){
  	int s;
	cin >> s;
  	cout << (s/100)%100+(s/10)%10+s%1 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope
    5 |         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:6:9: error: 'cout' was not declared in this scope
    6 |         cout << (s/100)%100+(s/10)%10+s%1 << endl;
      |         ^~~~
a.cc:6:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:6:46: error: 'endl' was not declared in this scope
    6 |         cout << (s/100)%100+(s/10)%10+s%1 << 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 <iostream>
using namespace std;
int main() {
  int s,count=0; cin >> s;
  for(int i=0;i<s.size();i++) {
    if (s.at(i)==1){
      count++;
    }
  }
  cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:19: error: request for member 'size' in 's', which is of non-class type 'int'
    5 |   for(int i=0;i<s.size();i++) {
      |                   ^~~~
a.cc:6:11: error: request for member 'at' in 's', which is of non-class type 'int'
    6 |     if (s.at(i)==1){
      |           ^~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:5:14: error: 'a' was not declared in this scope
    5 |         cin>>a,b,c;
      |              ^
a.cc:5:16: error: 'b' was not declared in this scope
    5 |         cin>>a,b,c;
      |                ^
a.cc:5:18: error: 'c' was not declared in this scope
    5 |         cin>>a,b,c;
      |                  ^
Language: C++

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

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


Compiler output:
a.cc:5:9: error: 'cin' does not name a type
    5 |         cin>>a,b,c;
      |         ^~~
a.cc:6:9: error: 'cout' does not name a type
    6 |         cout<<a+b+c<<endl;
      |         ^~~~
a.cc:7:1: error: expected declaration before '}' token
    7 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

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


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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: expected primary-expression before ';' token
    8 |   cin>>a>>;
      |           ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: expected primary-expression before ';' token
    8 |   cin>>a>>;
      |           ^
a.cc:11:16: error: expected ';' before 'if'
   11 |   d=a-(a/10)*10
      |                ^
      |                ;
   12 |     if(a=1){
      |     ~~
Language: Java



    





import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    String s = scan.next();
    char[] c = s.toCharArray();
    int ans = 0;
    for (char ch: c) {
      if (ch == '1') {
        ans++;
      }
    }
    System.out.println(ans);
  }


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

#include<bits/stdc++.h>
int main(){
  string str;
  cin >> str;
  int sum = 0;
  for(int i =0;i<3;i++){
    if(str[i] == 1){
      sum++;
    }
  }
  cout << sum;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'string' was not declared in this scope
    3 |   string str;
      |   ^~~~~~
a.cc:3: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:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin >> str;
      |   ^~~
      |   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:4:10: error: 'str' was not declared in this scope; did you mean 'std'?
    4 |   cin >> str;
      |          ^~~
      |          std
a.cc:11:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |   cout << sum;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C

#include<stdio.h>

int main(void)
{
    char s;
    int i;
    int ans=0;
    for(i=0;i<3;i++){
        scanf("%c",&s);
        if(s[i]=='1'){
            ans++;
        }
    }

    printf("%d\n",ans);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:13: error: subscripted value is neither array nor pointer nor vector
   10 |         if(s[i]=='1'){
      |             ^
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;
  
  while(true){
    bool exist_odd = false;
    for (int i=0;i<n;i++){
      if(a[i]%2 != 0) exist_odd = true;
    }
    
    if(exist_odd) 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:24:10: error: expected ';' before '}' token
   24 |     res++
      |          ^
      |          ;
   25 |   }
      |   ~
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;
  
  while(true){
    bool exist_odd = false;
    for (int i=0;i<n;i++){
      if(a[i]%2 != 0 exist_odd = true;
    }
    
    if(exist_odd) 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:16:21: error: expected ';' before 'exist_odd'
   16 |       if(a[i]%2 != 0 exist_odd = true;
      |                     ^~~~~~~~~~
      |                     ;
a.cc:17:5: error: expected primary-expression before '}' token
   17 |     }
      |     ^
a.cc:16:39: error: expected ')' before '}' token
   16 |       if(a[i]%2 != 0 exist_odd = true;
      |         ~                             ^
      |                                       )
   17 |     }
      |     ~                                  
a.cc:17:5: error: expected primary-expression before '}' token
   17 |     }
      |     ^
a.cc:24:10: error: expected ';' before '}' token
   24 |     res++
      |          ^
      |          ;
   25 |   }
      |   ~
Language: C++

#include<iostream>
using namespace std;

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


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

#include<iostream>
using namespace std;

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

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") ans++;
a.cc:9:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   if(s[1]=="1") ans++;
a.cc:10:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   if(s[2]=="1") ans++;
a.cc:11:15: error: expected identifier before '<<' token
   11 |   cout << and << endl;
      |               ^~
Language: C++

#include<iostream>
using namespace std;

int main(){
  int s,count;
  cin >> s;
  count = 0;
  for(int x:3){
    if(s.at(x)==1){
      count++;
    }
  }
  cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: 'begin' was not declared in this scope; did you mean 'std::begin'?
    8 |   for(int x:3){
      |             ^
      |             std::begin
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:114:37: note: 'std::begin' declared here
  114 |   template<typename _Tp> const _Tp* begin(const valarray<_Tp>&) noexcept;
      |                                     ^~~~~
a.cc:8:13: error: 'end' was not declared in this scope; did you mean 'std::end'?
    8 |   for(int x:3){
      |             ^
      |             std::end
/usr/include/c++/14/bits/range_access.h:116:37: note: 'std::end' declared here
  116 |   template<typename _Tp> const _Tp* end(const valarray<_Tp>&) noexcept;
      |                                     ^~~
a.cc:9:10: error: request for member 'at' in 's', which is of non-class type 'int'
    9 |     if(s.at(x)==1){
      |          ^~
Language: C

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

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

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

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

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

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

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: expected primary-expression before ';' token
    6 |  cin >> string;
      |               ^
a.cc:8:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |  if(str[0] == "1") count++;
a.cc:9:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |  if(str[1] == "1") count++;
a.cc:10:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |  if(str[2] == "1") count++;
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:70: error: expected ';' before '}' token
    7 |   cout << number%10+(number%100-number%10)/10+(number-number%100)/100
      |                                                                      ^
      |                                                                      ;
    8 | }
      | ~
Language: C++

#include<iostream>
using namespace std;
int main(){
  string a;
  cin >> a;
  int b = 0;
  if(a[0] == '1') b++;
  if(a[1] == '1') b++;
  if(a[2] == '1') b++;
  cout << b << endl;

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

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

Compiler output:
a.cc:1:21: warning: extra tokens at end of #include directive
    1 | #include <iostream> #include <string>
      |                     ^
a.cc:7:13: error: extended character ’ is not valid in an identifier
    7 |   if (s[0]==’1’)ans++;
      |             ^
a.cc:7:13: error: extended character ’ is not valid in an identifier
a.cc:8:13: error: extended character ’ is not valid in an identifier
    8 |   if (s[1]==’1’)ans++;
      |             ^
a.cc:8:13: error: extended character ’ is not valid in an identifier
a.cc:9:13: error: extended character ’ is not valid in an identifier
    9 |   if (s[2]==’1’)ans++;
      |             ^
a.cc:9:13: error: extended character ’ is not valid in an identifier
a.cc: In function 'int main()':
a.cc:7:13: error: '\U000020191\U00002019' was not declared in this scope
    7 |   if (s[0]==’1’)ans++;
      |             ^~~
a.cc:8:13: error: '\U000020191\U00002019' was not declared in this scope
    8 |   if (s[1]==’1’)ans++;
      |             ^~~
a.cc:9:13: error: '\U000020191\U00002019' was not declared in this scope
    9 |   if (s[2]==’1’)ans++;
      |             ^~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:5:13: error: conflicting declaration 'int s [2]'
    5 |   int s[1], s[2], s[3];
      |             ^
a.cc:5:7: note: previous declaration as 'int s [1]'
    5 |   int s[1], s[2], s[3];
      |       ^
a.cc:5:19: error: conflicting declaration 'int s [3]'
    5 |   int s[1], s[2], s[3];
      |                   ^
a.cc:5:7: note: previous declaration as 'int s [1]'
    5 |   int s[1], s[2], s[3];
      |       ^
Language: C++

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

int main(){
	int a;
	

	cin>>a;

	x = a.at(0)+a.at(1)+a.at(2)

	cout<<x;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'x' was not declared in this scope
   10 |         x = a.at(0)+a.at(1)+a.at(2)
      |         ^
a.cc:10:15: error: request for member 'at' in 'a', which is of non-class type 'int'
   10 |         x = a.at(0)+a.at(1)+a.at(2)
      |               ^~
a.cc:10:23: error: request for member 'at' in 'a', which is of non-class type 'int'
   10 |         x = a.at(0)+a.at(1)+a.at(2)
      |                       ^~
a.cc:10:31: error: request for member 'at' in 'a', which is of non-class type 'int'
   10 |         x = a.at(0)+a.at(1)+a.at(2)
      |                               ^~
Language: C++

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

int main(){
	int a;

	
	int x ;
	int count =0;

	for(int i=0;i<3;i++){
      	a = 0
		cin >> a;
		if (a ==1){
			count = count + 1;
		}
	}

	cout << count;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: expected ';' before 'cin'
   12 |         a = 0
      |              ^
      |              ;
   13 |                 cin >> a;
      |                 ~~~
Language: C++

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

int main(){
	int a;
	int b;
	
	int x ;
	int count =0;

	for(int i=0;i<3;i++){
		cin >> a;
		if (a ==1){
			count = count + 1;
		}
	}

	cout << count




}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:22: error: expected ';' before '}' token
   18 |         cout << count
      |                      ^
      |                      ;
......
   23 | }
      | ~
Language: C++

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

int main(){
	int a;
	int count =0;

	for(int i=0;i<3;i++){
		cin >> a;
		if (a ==1){
			count =+;
		}
	}

	cout << count




}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:33: error: expected primary-expression before ';' token
   11 |                         count =+;
      |                                 ^
a.cc:15:22: error: expected ';' before '}' token
   15 |         cout << count
      |                      ^
      |                      ;
......
   20 | }
      | ~
Language: C++

#include <cstdio>

using namespace std;
int a;
int ans;
int main()
{
	cin >> a;
	while(a > 0) {
		if(a % 10 == 1) {
			ans++;
		}
		a /= 10;
	}
	cout << ans;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope
    8 |         cin >> a;
      |         ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <cstdio>
  +++ |+#include <iostream>
    2 | 
a.cc:15:9: error: 'cout' was not declared in this scope
   15 |         cout << ans;
      |         ^~~~
a.cc:15:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

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

int main() {
  int a;
  cin >> a;
  cout << a.at(0) + a.at(1) + a.at(2) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: request for member 'at' in 'a', which is of non-class type 'int'
    7 |   cout << a.at(0) + a.at(1) + a.at(2) << endl;
      |             ^~
a.cc:7:23: error: request for member 'at' in 'a', which is of non-class type 'int'
    7 |   cout << a.at(0) + a.at(1) + a.at(2) << endl;
      |                       ^~
a.cc:7:33: error: request for member 'at' in 'a', which is of non-class type 'int'
    7 |   cout << a.at(0) + a.at(1) + a.at(2) << endl;
      |                                 ^~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:8:7: error: 'sum' undeclared (first use in this function)
    8 |       sum++;
      |       ^~~
main.c:8:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#define _CRT_SECURE_NO_WARNINGS
#include<bits/stdc++.h>
using namespace std;
#ifndef FAST_IO
 #define IOS ios_base::sync_with_stdio(false);cin.tie(nullptr);
#endif
#define FILE_IO freopen("input.txt","r",stdin)
#define f first
#define s second
#define endl '\n'
#define all(c) c.begin(),c.end()
#define debug(x) cerr << #x << " = " << x << endl;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
template<typename T>void print(T t){for(auto &it:t)cout<<it<<" ";}
inline int powerexp(int a,int b,int m){int res=1;while(b){if(b&1)res=res*a%m;a=a*a%m,b>>=1;}return res%m;}
void solve(){
    string s;
    cnt=0;
    cin>>s;
    for(auto it:s)cnt+=(it=='1');
    cout<<cnt<<endl;
 }
//-----------------------------
//comment from here for TOPCODER 
int32_t main(){
    IOS;
    solve();
    #ifdef LOCAL_DEFINE
    cerr<<"time elapsed "<<(double)clock()/CLOCKS_PER_SEC<<endl;
    #endif
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:18:5: error: 'cnt' was not declared in this scope; did you mean 'int'?
   18 |     cnt=0;
      |     ^~~
      |     int
Language: C

int main(int argc, char const *argv[])
{
	int a, max, temp;
	int s[101];

	scanf("%d", &a);
//	scanf("%d", &b);
//	scanf("%d", &c);
	scanf("%s", &s);

	for (int i = 0; i < a; ++i){
			scanf("%d", s[i]);
	}

	max = 0;

	for (int i = 0, temp = 0; i < a; ++i)
	{
		while(s[i] % 2 == 0)
		{
			s[i] / 2;
			temp++;

		}else{
			if (temp >= max)
			{
				max = temp;
			}

		}
	}

	printf("%d\n", max);



	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:9: 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(int argc, char const *argv[])
main.c:6:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |         scanf("%d", &a);
      |         ^~~~~
main.c:6:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:24:18: error: 'else' without a previous 'if'
   24 |                 }else{
      |                  ^~~~
main.c:33:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   33 |         printf("%d\n", max);
      |         ^~~~~~
main.c:33:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:33:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:33:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include <stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:11:9: error: 'return0' undeclared (first use in this function)
   11 |         return0;
      |         ^~~~~~~
main.c:11:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:11:9: error: 'return0' undeclared (first use in this function)
   11 |         return0;
      |         ^~~~~~~
main.c:11:9: 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() {
  char s[3];
  cin >> s;
  int cnt = 0;
  for(int i=0;i<3;i++){
    if(s[i] == "1"){
      cnt++;
    }
    cout << cnt;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |     if(s[i] == "1"){
      |        ~~~~~^~~~~~
a.cc:12:3: error: expected '}' at end of input
   12 |  }
      |   ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: Java

using System;

class Program
{
    static void Main(string[] args)
    {
        string s = Input.next();
        Console.WriteLine(s.Length - s.Replace("1", "").Length);
    }

}


class Input
{
    static string[] line = { };
    static int index = 0;
    static void readLine()
    {
        line = Console.ReadLine().Split(' ');
        index = 0;
    }
    public static int nextInt()
    {
        if (index == line.Length)
        {

            readLine();
        }
        index++;
        return int.Parse(line[index - 1]);
    }
    public static long nextLong()
    {
        if (index == line.Length)
        {

            readLine();
        }
        index++;
        return long.Parse(line[index - 1]);
    }
    public static string next()
    {
        if (index == line.Length)
        {

            readLine();
        }
        index++;
        return line[index - 1];
    }
}




Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
using System;
^
  (use --enable-preview to enable unnamed classes)
Main.java:31: error: class expected
        return int.Parse(line[index - 1]);
                   ^
Main.java:31: error: ';' expected
        return int.Parse(line[index - 1]);
                        ^
Main.java:31: error: not a statement
        return int.Parse(line[index - 1]);
                             ^
Main.java:31: error: ';' expected
        return int.Parse(line[index - 1]);
                                        ^
Main.java:41: error: class expected
        return long.Parse(line[index - 1]);
                    ^
Main.java:41: error: ';' expected
        return long.Parse(line[index - 1]);
                         ^
Main.java:41: error: not a statement
        return long.Parse(line[index - 1]);
                              ^
Main.java:41: error: ';' expected
        return long.Parse(line[index - 1]);
                                         ^
9 errors
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 'abc' was not declared in this scope; did you mean 'abs'?
    6 |   cin >> abc;
      |          ^~~
      |          abs
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:9:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |         if(s[0] == "1") count++;
a.cc:10:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |         if(s[1] == "1") count++;
a.cc:11:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |         if(s[2] == "1") count++;
Language: C++

#include "bits/stdc++.h"
using ll = long long;
using namespace std;
int main(){
string a;
cin>>a;
ll ans =0;
for(ll i=0;i<3;i++){
if(a[i]=='1')
ans++;
}
cout<<ans<<ensl;
}


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

#include "bits/stdc++.h"
using ll = long long;
using namespace std;
int main(){
string a;
cin>>a;
ll ans =0;
for(ll i=0;i<3;i++){
if(a[i]==1)
ans++;
}
cout<<ans<<ensl;
}


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

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

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

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

#include <bits/stdc++.h>
using namespace std;
int main() {
  int s[1],s{2],s[3];
  cin >>s[1]>>s[2]>>s[3];
  cout <<s[1]+s[2]+s[3]<< endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:12: error: conflicting declaration 'int s'
    4 |   int s[1],s{2],s[3];
      |            ^
a.cc:4:7: note: previous declaration as 'int s [1]'
    4 |   int s[1],s{2],s[3];
      |       ^
a.cc:4:15: error: expected '}' before ']' token
    4 |   int s[1],s{2],s[3];
      |             ~ ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int s[1] , s{2] , s[3];
  cin >> s[1] >> s[2] >> s[3];
  cout <<s[1]+s[2]+s[3]<< endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:14: error: conflicting declaration 'int s'
    4 |   int s[1] , s{2] , s[3];
      |              ^
a.cc:4:7: note: previous declaration as 'int s [1]'
    4 |   int s[1] , s{2] , s[3];
      |       ^
a.cc:4:17: error: expected '}' before ']' token
    4 |   int s[1] , s{2] , s[3];
      |               ~ ^
Language: C++

#include <iostream>

using namespace std;

int maint(){
  int s;
  int answer=0;
  for(int i=0;i<3;++i){
    cin>>s;
    answer+=s;
  }
  return 0;
}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

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

int main(){
	// input
	string S; cin >> S;
	// compute
  	int ans = 0;
	for (int i=0; i<3; i++){
      int num = atoi(S[i].c_str());
      if(num == 1) ans++;
    }
	
	// output
	cout << ans << endl;
}

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

#include<iostream>
using namespace std;
int main(){
  int a,s1,s2,s3;
  int n=0;
  cin>>a;
  s1 = a/100;
  s2 = (a-s1*100)/10;
  s3 = a-s1*100-s2*10;
  if(s1==1) n++;
  if(s2==1) n++;
  if(s3==1) n++;
  cout<<n<<endl;
  reutnr 0;
}

  

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: expected ';' before 'c'
    8 |   a = a - 100*b
      |                ^
      |                ;
    9 |   c = a % 10;
      |   ~             
a.cc:10:15: error: expected ';' before 'd'
   10 |   a = a - 10*c
      |               ^
      |               ;
   11 |   d = a % 1;
      |   ~