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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a;
  int 100_digit, 10_digit, 1_digit;
  
  // 変数aで入力を受け取る
  cin >> a;
  
  100_digit =  a / 100 ;
  10_digit = (a - 100* 100_digit) / 10;
  1_digit = (a - 100 * 100_digit -10 * 10_digit) /1;
  
  cout << 100_digit + 10_digit + 1_digit<< endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: expected unqualified-id before numeric constant
    6 |   int 100_digit, 10_digit, 1_digit;
      |       ^~~~~~~~~
a.cc:11:3: error: unable to find numeric literal operator 'operator""_digit'
   11 |   100_digit =  a / 100 ;
      |   ^~~~~~~~~
a.cc:12:3: error: unable to find numeric literal operator 'operator""_digit'
   12 |   10_digit = (a - 100* 100_digit) / 10;
      |   ^~~~~~~~
a.cc:12:24: error: unable to find numeric literal operator 'operator""_digit'
   12 |   10_digit = (a - 100* 100_digit) / 10;
      |                        ^~~~~~~~~
a.cc:13:3: error: unable to find numeric literal operator 'operator""_digit'
   13 |   1_digit = (a - 100 * 100_digit -10 * 10_digit) /1;
      |   ^~~~~~~
a.cc:13:24: error: unable to find numeric literal operator 'operator""_digit'
   13 |   1_digit = (a - 100 * 100_digit -10 * 10_digit) /1;
      |                        ^~~~~~~~~
a.cc:13:40: error: unable to find numeric literal operator 'operator""_digit'
   13 |   1_digit = (a - 100 * 100_digit -10 * 10_digit) /1;
      |                                        ^~~~~~~~
a.cc:15:11: error: unable to find numeric literal operator 'operator""_digit'
   15 |   cout << 100_digit + 10_digit + 1_digit<< endl;
      |           ^~~~~~~~~
a.cc:15:23: error: unable to find numeric literal operator 'operator""_digit'
   15 |   cout << 100_digit + 10_digit + 1_digit<< endl;
      |                       ^~~~~~~~
a.cc:15:34: error: unable to find numeric literal operator 'operator""_digit'
   15 |   cout << 100_digit + 10_digit + 1_digit<< endl;
      |                                  ^~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a;
  int 100_digit, 10_digit, 1_digit;
  
  // 変数aで入力を受け取る
  cin >> a;
  
  100_digit =  a / 100 ;
  10_digit = (a - 100* 100_digit) / 10;
  1_digit = (a - 100 * 100_digit -10 * 10_digit) /1;
  
  
  cout << 100_digit + 10_digit + 1_digit<< endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: expected unqualified-id before numeric constant
    6 |   int 100_digit, 10_digit, 1_digit;
      |       ^~~~~~~~~
a.cc:11:3: error: unable to find numeric literal operator 'operator""_digit'
   11 |   100_digit =  a / 100 ;
      |   ^~~~~~~~~
a.cc:12:3: error: unable to find numeric literal operator 'operator""_digit'
   12 |   10_digit = (a - 100* 100_digit) / 10;
      |   ^~~~~~~~
a.cc:12:24: error: unable to find numeric literal operator 'operator""_digit'
   12 |   10_digit = (a - 100* 100_digit) / 10;
      |                        ^~~~~~~~~
a.cc:13:3: error: unable to find numeric literal operator 'operator""_digit'
   13 |   1_digit = (a - 100 * 100_digit -10 * 10_digit) /1;
      |   ^~~~~~~
a.cc:13:24: error: unable to find numeric literal operator 'operator""_digit'
   13 |   1_digit = (a - 100 * 100_digit -10 * 10_digit) /1;
      |                        ^~~~~~~~~
a.cc:13:40: error: unable to find numeric literal operator 'operator""_digit'
   13 |   1_digit = (a - 100 * 100_digit -10 * 10_digit) /1;
      |                                        ^~~~~~~~
a.cc:16:11: error: unable to find numeric literal operator 'operator""_digit'
   16 |   cout << 100_digit + 10_digit + 1_digit<< endl;
      |           ^~~~~~~~~
a.cc:16:23: error: unable to find numeric literal operator 'operator""_digit'
   16 |   cout << 100_digit + 10_digit + 1_digit<< endl;
      |                       ^~~~~~~~
a.cc:16:34: error: unable to find numeric literal operator 'operator""_digit'
   16 |   cout << 100_digit + 10_digit + 1_digit<< endl;
      |                                  ^~~~~~~
a.cc:16:49: error: expected '}' at end of input
   16 |   cout << 100_digit + 10_digit + 1_digit<< endl;
      |                                                 ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a;
  int 100_digit, 10_digit, 1_digit;
  
  // 変数aで入力を受け取る
  cin >> a;
  
  100_digit =  a / 100 ;
  10_digit = (a - 100* 100_digit) / 10;
  1_digit = (a - 100 * 100_digit -10 * 10_digit) /1;
  
  
  cout << i_ave+(i_ave % 2) * (i_ave % 2) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: expected unqualified-id before numeric constant
    6 |   int 100_digit, 10_digit, 1_digit;
      |       ^~~~~~~~~
a.cc:11:3: error: unable to find numeric literal operator 'operator""_digit'
   11 |   100_digit =  a / 100 ;
      |   ^~~~~~~~~
a.cc:12:3: error: unable to find numeric literal operator 'operator""_digit'
   12 |   10_digit = (a - 100* 100_digit) / 10;
      |   ^~~~~~~~
a.cc:12:24: error: unable to find numeric literal operator 'operator""_digit'
   12 |   10_digit = (a - 100* 100_digit) / 10;
      |                        ^~~~~~~~~
a.cc:13:3: error: unable to find numeric literal operator 'operator""_digit'
   13 |   1_digit = (a - 100 * 100_digit -10 * 10_digit) /1;
      |   ^~~~~~~
a.cc:13:24: error: unable to find numeric literal operator 'operator""_digit'
   13 |   1_digit = (a - 100 * 100_digit -10 * 10_digit) /1;
      |                        ^~~~~~~~~
a.cc:13:40: error: unable to find numeric literal operator 'operator""_digit'
   13 |   1_digit = (a - 100 * 100_digit -10 * 10_digit) /1;
      |                                        ^~~~~~~~
a.cc:16:11: error: 'i_ave' was not declared in this scope
   16 |   cout << i_ave+(i_ave % 2) * (i_ave % 2) << endl;
      |           ^~~~~
Language: Java

import java.util.Scanner;

public class p1 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int[] N = new int[n];
        int count = 0;
        boolean check = true;

        for(int i = 0 ; i < n ; i++){
           N[i] = scan.nextInt();
        }

        while(check){

        for(int t : N ){
           if(t % 2 == 1){
             check = false;
             count --;
             break;
           }
        }
        for(int i = 0 ; i < n ; i++) {
        	N[i] /= 2;
        }
        count ++;
        }
      System.out.println(count);
    }

}

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

import java.util.Scanner;

public class p1 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        int n = scan.nextInt();
        int[] N = new int[n];
        int count = 0;
        boolean check = true;

        for(int i = 0 ; i < n ; i++){
           N[i] = scan.nextInt();
        }

        while(check){

        for(int t : N ){
           if(t % 2 == 1){
             check = false;
             count --;
             break;
           }
        }
        count ++;
        }
      System.out.println(count);
    }
}


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

#include<iostream>
using namespace std;

int main(){
  int N;
  cin>>N;
  int a[N];
  int i;
  for(i=0;i<N;++i){
    cin>>a[i];
  }
  int cnt;
  cnt=0;
  bool isOdd=false;
  while(true){
    for(i=0;i<N;++i){
      if(a[i]%2!=0){
        isOdd=true;
      }
    }
      if(isOdd) break;
      ++cnt;
    for(i=0;i<N;++i){
      a[i]/=2;
    }
    cout<<cnt<<endl;
  }
      


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

#include<iostream>
using namespace std;

int main(){
  int N;
  cin>>N;
  int a[N];
  int i;
  for(i=0;i<N;++i){
    cin>>a[i];
  }
  int cnt;
  cnt=0;
  bool isOdd=false;
  while(true){
    for(i=0;i<N;++i){
      if(a[i]%2!=0){
        isOdd=true;
      }
      if(isOdd) break;
      ++cnt;
    for(i=0;i<N;++i){
      a[i]/=2;
    }
    }
    cout<<cnt<<endl;
  }
      


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

#include<iostream>
using namespace std;

int main(){
  int N;
  cin>>N;
  vector<int> a[N];
  int i;
  for(i=0;i<N;++i){
    cin>>a[i];
  }
  int cnt;
  cnt=0;
  bool isOdd=false;
  while(true){
    for(i=0;i<N;++i){
      if(a[i]%2!=0){
        isOdd=true;
      }
      if(isOdd) break;
      ++cnt;
    for(i=0;i<N;++i){
      a[i]/=2;
    }
    }
    cout<<cnt<<endl;
  }
      


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: 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:10: error: expected primary-expression before 'int'
    7 |   vector<int> a[N];
      |          ^~~
a.cc:10:10: error: 'a' was not declared in this scope
   10 |     cin>>a[i];
      |          ^
a.cc:17:10: error: 'a' was not declared in this scope
   17 |       if(a[i]%2!=0){
      |          ^
a.cc:23:7: error: 'a' was not declared in this scope
   23 |       a[i]/=2;
      |       ^
a.cc:27:4: error: expected '}' at end of input
   27 |   }
      |    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;

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


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

#include<iostream>
using namespace std;

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

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

//Radhe Radhe
#include<bits/stdc++.h>
#define godspeed  ios_base:: sync_with_stdio(false); cin.tie(0); cout.tie(0);

#define ll long long
#define ld long double
#define fi first
#define se second
#define mp make_pair
#define rep1(i,a,b)    for(ll i=a; i<=b; i++)
#define repVect(i,n)    for(ll i=0; i<sum.size(); i++)
#define fixed cout.setf(ios::fixed);
#define Precise cout.precision(7);
#define yes cout<<"Yes"<<'\n'
#define no cout<<"No"<<'\n'
using namespace std;

int main()
{
    godspeed
    ll  i,j,k,l,n,ans=0;
    cin>>s;
    for(i=0;s[i];i++){
        if(s[i]=='1') ans++;
        
    }
    cout<<ans<<endl;
    return 0;
}





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

#include <bits/stdc++.h>using namespace std;
 
int main() {
  string a;
  cin >> a;
  int ttl = 0;
  for (char &c : a) {
    ttl += (int)(c - '0');
  }
  cout << ttl << endl;
}

Compiler output:
a.cc:1:31: warning: extra tokens at end of #include directive
    1 | #include <bits/stdc++.h>using namespace std;
      |                               ^~~~~~~~~
a.cc:1:10: fatal error: bits/stdc++.h>usin: No such file or directory
    1 | #include <bits/stdc++.h>using namespace std;
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

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

int main() {
  string a;
  cin >> a;
  int ttl = 0;
  for (char &c : a) {
    cout << "before ttl: " << ttl << endl;
    ttl += (int)(c - '0');
    cout << "after ttl: " << ttl << endl;
  }
  cout << ttl << endl;
}


Compiler output:
a.cc:1:31: warning: extra tokens at end of #include directive
    1 | #include <bits/stdc++.h>using namespace std;
      |                               ^~~~~~~~~
a.cc:1:10: fatal error: bits/stdc++.h>usin: No such file or directory
    1 | #include <bits/stdc++.h>using namespace std;
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

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


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: invalid types 'int[int]' for array subscript
    7 |   cout << s[1] + s2[2] + s3[3] << endl;
      |            ^
a.cc:7:18: error: 's2' was not declared in this scope; did you mean 's'?
    7 |   cout << s[1] + s2[2] + s3[3] << endl;
      |                  ^~
      |                  s
a.cc:7:26: error: 's3' was not declared in this scope; did you mean 's'?
    7 |   cout << s[1] + s2[2] + s3[3] << endl;
      |                          ^~
      |                          s
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: 'si' was not declared in this scope; did you mean 's3'?
    7 |   cout << si + s2 + s3 << endl;
      |           ^~
      |           s3
Language: C

#include<stdio.h>
int main(void) {
  int s[3];
  scanf("%d%d%d", &s1, &s2, &s3);
  int c;
  if(s[0] == 1) {
    c++;
  }
  if(s[1] == 1) {
    c++;
  }
  if(s[2] == 1) {
    c++;
  }
  printf("%d\n", c);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:20: error: 's1' undeclared (first use in this function); did you mean 's'?
    4 |   scanf("%d%d%d", &s1, &s2, &s3);
      |                    ^~
      |                    s
main.c:4:20: note: each undeclared identifier is reported only once for each function it appears in
main.c:4:25: error: 's2' undeclared (first use in this function); did you mean 's'?
    4 |   scanf("%d%d%d", &s1, &s2, &s3);
      |                         ^~
      |                         s
main.c:4:30: error: 's3' undeclared (first use in this function); did you mean 's'?
    4 |   scanf("%d%d%d", &s1, &s2, &s3);
      |                              ^~
      |                              s
Language: C

#include<stdio.h>
int main(void) {
  int s1, s2, s3;
  scanf("%d%d%d", &s1, &s2, &s3);
  int c;
  if(s1 == 1) {
    c++;
  }
  if(s2 == 1) {
    c++;
  }
  if(s1 == 1) {
    c++;
  }
  printf("%d\n", c);
  return 0;

Compiler output:
main.c: In function 'main':
main.c:16:3: error: expected declaration or statement at end of input
   16 |   return 0;
      |   ^~~~~~
Language: C++

#include <iostream>

using namespace std;

char a[3];
int count=0;
cin>>a;

int main(){
for (size_t i = 0; i < 3; i++)
{
    if (char[i]==1){++count;}
}
  cout<<count;
}

Compiler output:
a.cc:7:1: error: 'cin' does not name a type
    7 | cin>>a;
      | ^~~
a.cc: In function 'int main()':
a.cc:12:13: error: expected unqualified-id before '[' token
   12 |     if (char[i]==1){++count;}
      |             ^
Language: C++

#include <iostream>

char a[3];
int count=0;
cin>>a;

int main(){
for (size_t i = 0; i < 3; i++)
{
    if (char[i]==1){++count;}
}
  cout<<count;
}

Compiler output:
a.cc:5:1: error: 'cin' does not name a type
    5 | cin>>a;
      | ^~~
a.cc: In function 'int main()':
a.cc:10:13: error: expected unqualified-id before '[' token
   10 |     if (char[i]==1){++count;}
      |             ^
a.cc:12:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |   cout<<count;
      |   ^~~~
      |   std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: lvalue required as left operand of assignment
   10 |   if( a / 100 = 1)
      |       ~~^~~~~
a.cc:14:15: error: lvalue required as left operand of assignment
   14 |   if (a % 100 / 10 = 1)
      |       ~~~~~~~~^~~~
a.cc:18:9: error: lvalue required as left operand of assignment
   18 |   if (a % 10 = 1)
      |       ~~^~~~
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:9:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   if(s[0] == "1") counter++;
a.cc:10:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   if(s[1] == "1") counter++;
a.cc:11:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |   if(s[2] == "1") counter++;
Language: C++

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

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

    int b = 0;

    for (int i = 0; i < 2; i++){
        if (str[i] == "1") b++;

    }
    cout << b << endl;
}

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

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

int main(){
  string s;
  int s1, s2, s3;
  
  cin >> s;
  s = s.c_str();
  cout << atoi(s[0]) + atoi(s[1]) + atoi(s[2]) << endl;
}


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

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

int main(){
  string s;
  int s1, s2, s3;
  
  cin >> s;
  cout << atoi(s[0]) + atoi(s[1]) + atoi(s[2]) << endl;
}


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

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

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

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

	cout <<  iCount;
	
	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") {
a.cc:12:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |         if (str[1] == "1") {
a.cc:15:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |         if (str[2] == "1") {
Language: C++

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

int main(){
    int S1, S2, S3;
    cin >> S1 >> S2 >> S3;
    cout << S+S+S << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: 'S' was not declared in this scope; did you mean 'S3'?
    7 |     cout << S+S+S << endl;
      |             ^
      |             S3
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<stdio.h>

int main()
{
 char g[3];
 int i=0:

 scanf("%s",g);

 if(g[0]=='1')i++;
 if(g[1]=='1')i++;
 if(g[2]=='1')i++;

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

 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: expected ',' or ';' before ':' token
    6 |  int i=0:
      |         ^
Language: C++

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

int main() {
  // ここにプログラムを追記
  int i, x;
  string a;
  cin >> a;
  x = 0;
  for(i = 0; i < a.size(); i++)
  {
  if(a.size(i) == 1){
   x += 1;
   }
  }
  cout << x << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:12: error: no matching function for call to 'std::__cxx11::basic_string<char>::size(int&)'
   12 |   if(a.size(i) == 1){
      |      ~~~~~~^~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:1076:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
 1076 |       size() const _GLIBCXX_NOEXCEPT
      |       ^~~~
/usr/include/c++/14/bits/basic_string.h:1076:7: note:   candidate expects 0 arguments, 1 provided
Language: C++

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

int main() {
  // ここにプログラムを追記
  int a, i, x;
  cin >> a;
  x = 0;
  for(i = 0; i < a.size(); i++)
  {
  if(a.size(i)== 1){
   x += 1;
   }
  }
  cout << x << endl;
}

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

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

int main(){
  int a,ans = 0;
  cin >> a;
  cnt += a/100;
  cnt += (a/10) % 2;
  cnt += a%2;
  cout << cnt << endl;
}
 

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'cnt' was not declared in this scope; did you mean 'int'?
    7 |   cnt += a/100;
      |   ^~~
      |   int
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main() {
int a,b,c;
cin>>a>>b>>c;

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



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

#include<stdio.h>

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

}

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

#include<stdio.h>

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

}

Compiler output:
main.c: In function 'main':
main.c:13:26: error: expected ';' before '}' token
   13 | printf("%d",c+=(int)s[i])
      |                          ^
      |                          ;
   14 | }
      | ~
Language: C++

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

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


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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: expected initializer before '<' token
    5 |   int s<sub>1</sub> ,s<sub>2</sub> , s<sub>3</sub> ;
      |        ^
a.cc:6:11: error: 's' was not declared in this scope
    6 |   cin >>  s<sub>1</sub> >> s<sub>2</sub> >> s<sub>3</sub> ;
      |           ^
a.cc:6:13: error: 'sub' was not declared in this scope; did you mean 'fsub'?
    6 |   cin >>  s<sub>1</sub> >> s<sub>2</sub> >> s<sub>3</sub> ;
      |             ^~~
      |             fsub
a.cc:6:19: error: expected primary-expression before '/' token
    6 |   cin >>  s<sub>1</sub> >> s<sub>2</sub> >> s<sub>3</sub> ;
      |                   ^
a.cc:6:25: error: expected primary-expression before '>>' token
    6 |   cin >>  s<sub>1</sub> >> s<sub>2</sub> >> s<sub>3</sub> ;
      |                         ^~
a.cc:6:36: error: expected primary-expression before '/' token
    6 |   cin >>  s<sub>1</sub> >> s<sub>2</sub> >> s<sub>3</sub> ;
      |                                    ^
a.cc:6:42: error: expected primary-expression before '>>' token
    6 |   cin >>  s<sub>1</sub> >> s<sub>2</sub> >> s<sub>3</sub> ;
      |                                          ^~
a.cc:6:53: error: expected primary-expression before '/' token
    6 |   cin >>  s<sub>1</sub> >> s<sub>2</sub> >> s<sub>3</sub> ;
      |                                                     ^
a.cc:6:59: error: expected primary-expression before ';' token
    6 |   cin >>  s<sub>1</sub> >> s<sub>2</sub> >> s<sub>3</sub> ;
      |                                                           ^
a.cc:7:19: error: expected primary-expression before '/' token
    7 |   cout << s<sub>1</sub> + s<sub>2</sub> + s<sub>3</sub> << endl;
      |                   ^
a.cc:7:35: error: expected primary-expression before '/' token
    7 |   cout << s<sub>1</sub> + s<sub>2</sub> + s<sub>3</sub> << endl;
      |                                   ^
a.cc:7:51: error: expected primary-expression before '/' token
    7 |   cout << s<sub>1</sub> + s<sub>2</sub> + s<sub>3</sub> << endl;
      |                                                   ^
a.cc:7:57: error: expected primary-expression before '<<' token
    7 |   cout << s<sub>1</sub> + s<sub>2</sub> + s<sub>3</sub> << endl;
      |                                                         ^~
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[2] + s[2] + s[3] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:14: 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:21: 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 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:15: error: redeclaration of 'int s_'
    5 |   int s_{1} , s_{2} , s_{3} ;
      |               ^~
a.cc:5:7: note: 'int s_' previously declared here
    5 |   int s_{1} , s_{2} , s_{3} ;
      |       ^~
a.cc:5:23: error: redeclaration of 'int s_'
    5 |   int s_{1} , s_{2} , s_{3} ;
      |                       ^~
a.cc:5:7: note: 'int s_' previously declared here
    5 |   int s_{1} , s_{2} , s_{3} ;
      |       ^~
a.cc:6:12: error: expected ';' before '{' token
    6 |   cin >> s_{1} >> s_{2} >> s_{3} ;
      |            ^
      |            ;
a.cc:6:16: error: expected primary-expression before '>>' token
    6 |   cin >> s_{1} >> s_{2} >> s_{3} ;
      |                ^~
a.cc:6:25: error: expected primary-expression before '>>' token
    6 |   cin >> s_{1} >> s_{2} >> s_{3} ;
      |                         ^~
a.cc:7:13: error: expected ';' before '{' token
    7 |   cout << s_{1} + s_{2} + s_{3} << endl;
      |             ^
      |             ;
a.cc:7:21: error: expected ';' before '{' token
    7 |   cout << s_{1} + s_{2} + s_{3} << endl;
      |                     ^
      |                     ;
a.cc:7:29: error: expected ';' before '{' token
    7 |   cout << s_{1} + s_{2} + s_{3} << endl;
      |                             ^
      |                             ;
a.cc:7:33: error: expected primary-expression before '<<' token
    7 |   cout << s_{1} + s_{2} + s_{3} << endl;
      |                                 ^~
Language: C++

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

int main() {
  // ここにプログラムを追記
  string mass;
  cin >> mass;
  int cnt=0;
  for(int i=0; i < mass.size(); i++){
    if(atoi(mass[i]) == 1) cnt++;
  }
  cout << cnt << endl;
}

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

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

int main() {
  // ここにプログラムを追記
  string mass;
  cin >> mass;
  int cnt=0;
  for(i=0; i < mass.size(); i++){
    if(mass[i] == 1) cnt++;
  }
  cout << cnt << endl;
}

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

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

int main() {
  // ここにプログラムを追記
  string mass;
  cin >> mass;
  int cnt=0;
  for(i=0; i < mass.length(); i++){
    if(mass[i] == 1) cnt++;
  }
  cout << cnt << endl;
}

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

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

int main() {
  int a;

  cin >> a ;
int b=a%100;
  cout << (a-b%200/100+(b-b%10)%20/10+b%10<< endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:43: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    9 |   cout << (a-b%200/100+(b-b%10)%20/10+b%10<< endl;
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
a.cc:9:50: error: expected ')' before ';' token
    9 |   cout << (a-b%200/100+(b-b%10)%20/10+b%10<< endl;
      |           ~                                      ^
      |                                                  )
Language: C++

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

int main() {
  int a;

  cin >> a ;
int b=a%100
  cout << (a-b%200/100+(b-b%10)%20/10+b%10<< endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'cout'
    9 |   cout << (a-b%200/100+(b-b%10)%20/10+b%10<< endl;
      |   ^~~~
Language: C

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


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

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


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

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

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

Compiler output:
a.cc:5:1: error: '::main' must return 'int'
    5 | void main(){
      | ^~~~
Language: C++

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

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

Compiler output:
a.cc:5:1: error: '::main' must return 'int'
    5 | void main(){
      | ^~~~
Language: C++

#include <iostream>
using namespace std;

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

Compiler output:
a.cc:4:1: error: '::main' must return 'int'
    4 | void main(){
      | ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int s=0, count;
  int s1=0, s2=0, s3=0;
  cin >> s;
  s1 = s/100;
  s = s%100;
  if(0<s) count++;
  s2 = s/10
  s = s%10;
  if(0<s) count++;
  s3 = s;
  s = s%1;
  if(0<s) count++;
  if(s1<0||1<s1||s2<0||1<s2||s3<0||1<s3) cout << "入力エラー(制約 : Sは0か1)" << endl;
  else cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: expected ';' before 's'
   10 |   s2 = s/10
      |            ^
      |            ;
   11 |   s = s%10;
      |   ~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:13:25: error: expected '}' at end of input
   13 |   cout << x+y+z << endl;
      |                         ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

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


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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: expected ';' before 'if'
    7 |   cin >> s
      |           ^
      |           ;
    8 |   if (s[0] == 1) {
      |   ~~       
a.cc:12:12: error: expected ';' before '}' token
   12 |   a = a + 1
      |            ^
      |            ;
   13 | }
      | ~           
a.cc:15:12: error: expected ';' before 'cout'
   15 |   a = a + 1
      |            ^
      |            ;
   16 | cout << a << endl;
      | ~~~~        
a.cc:18:2: error: expected '}' at end of input
   18 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() {
  int S1 , S2 , S3 , S1S2S3;
    cin >> S1S2S3;
  S1 * 100 + S2 * 10 + S3 = S1S2S3;
  cout << S1 + S2 + S3  << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: lvalue required as left operand of assignment
    7 |   S1 * 100 + S2 * 10 + S3 = S1S2S3;
      |   ~~~~~~~~~~~~~~~~~~~^~~~
Language: C++

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

int main() {
  int s;
  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:6:10: error: invalid types 'int[int]' for array subscript
    6 |   cin >>s[1]>>s[2]>>s[3];
      |          ^
a.cc:6:16: error: invalid types 'int[int]' for array subscript
    6 |   cin >>s[1]>>s[2]>>s[3];
      |                ^
a.cc:6:22: error: invalid types 'int[int]' for array subscript
    6 |   cin >>s[1]>>s[2]>>s[3];
      |                      ^
a.cc:7:12: error: invalid types 'int[int]' for array subscript
    7 |   cout << s[1]+s[2]+s[3] << endl;
      |            ^
a.cc:7:17: error: invalid types 'int[int]' for array subscript
    7 |   cout << s[1]+s[2]+s[3] << endl;
      |                 ^
a.cc:7:22: error: invalid types 'int[int]' for array subscript
    7 |   cout << s[1]+s[2]+s[3] << endl;
      |                      ^
Language: C++

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

int main() {
  int s
  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:6:3: error: expected initializer before 'cin'
    6 |   cin >>s[1]>>s[2]>>s[3];
      |   ^~~
a.cc:7:11: error: 's' was not declared in this scope
    7 |   cout << s[1]+s[2]+s[3] << endl;
      |           ^
Language: C++

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

int main() {
  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:9: error: 's' was not declared in this scope
    5 |   cin >>s[1]>>s[2]>>s[3];
      |         ^
Language: C++

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

int main() {
  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:10: error: 's' was not declared in this scope
    5 |   cin >> 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: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 s;
  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:6:11: error: invalid types 'int[int]' for array subscript
    6 |   cin >> s[1]>>s[2]>>s[3];
      |           ^
a.cc:6:17: error: invalid types 'int[int]' for array subscript
    6 |   cin >> s[1]>>s[2]>>s[3];
      |                 ^
a.cc:6:23: error: invalid types 'int[int]' for array subscript
    6 |   cin >> s[1]>>s[2]>>s[3];
      |                       ^
a.cc:7:12: error: invalid types 'int[int]' for array subscript
    7 |   cout << s[1]+s[2]+s[3] << endl;
      |            ^
a.cc:7:17: error: invalid types 'int[int]' for array subscript
    7 |   cout << s[1]+s[2]+s[3] << endl;
      |                 ^
a.cc:7:22: error: invalid types 'int[int]' for array subscript
    7 |   cout << s[1]+s[2]+s[3] << endl;
      |                      ^
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:12: 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:17: 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 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: redeclaration of 'int s_'
    5 |   int s_{1},s_{2},s_{3};
      |             ^~
a.cc:5:7: note: 'int s_' previously declared here
    5 |   int s_{1},s_{2},s_{3};
      |       ^~
a.cc:5:19: error: redeclaration of 'int s_'
    5 |   int s_{1},s_{2},s_{3};
      |                   ^~
a.cc:5:7: note: 'int s_' previously declared here
    5 |   int s_{1},s_{2},s_{3};
      |       ^~
a.cc:6:12: error: expected ';' before '{' token
    6 |   cin >> s_{1}>>s_{2}>>s_{3};
      |            ^
      |            ;
a.cc:6:15: error: expected primary-expression before '>>' token
    6 |   cin >> s_{1}>>s_{2}>>s_{3};
      |               ^~
a.cc:6:22: error: expected primary-expression before '>>' token
    6 |   cin >> s_{1}>>s_{2}>>s_{3};
      |                      ^~
a.cc:7:13: error: expected ';' before '{' token
    7 |   cout << s_{1}+s_{2}+s_{3} << endl;
      |             ^
      |             ;
a.cc:7:19: error: expected ';' before '{' token
    7 |   cout << s_{1}+s_{2}+s_{3} << endl;
      |                   ^
      |                   ;
a.cc:7:25: error: expected ';' before '{' token
    7 |   cout << s_{1}+s_{2}+s_{3} << endl;
      |                         ^
      |                         ;
a.cc:7:29: error: expected primary-expression before '<<' token
    7 |   cout << s_{1}+s_{2}+s_{3} << endl;
      |                             ^~
Language: C++

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'str' was not declared in this scope; did you mean 'std'?
    6 |   str s;
      |   ^~~
      |   std
a.cc:7:10: error: 's' was not declared in this scope
    7 |   cin >> s;
      |          ^
Language: Java

import java.util.*;
import java.io.*;

public class Main{
  public static void main(String[] args){
    InputStreamReader in = new InputStreamReader(System.in);
    int ans = 0;
    for (int i = 0; i < 3; i++){
      ans += Integer.parseInt(in.read());
    }
    System.out.println(ans);
  }
}


Compiler output:
Main.java:9: error: incompatible types: int cannot be converted to String
      ans += Integer.parseInt(in.read());
                                     ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: 's' was not declared in this scope
    7 |   cout << s/100+s/10+s/1 << endl;
      |           ^
Language: C++

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

cout << c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'a' was not declared in this scope
    8 |  cin >> a[i];
      |         ^