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

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

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


Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'timespace'
    2 | using timespace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |   cin >> s1 >> s2 >> s3;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |   cout << s1 + s2 + s3 << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:27: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |   cout << s1 + s2 + s3 << endl;
      |                           ^~~~
      |                           std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'cin'
    6 |   cin >> s1 >> s2 >> s3;
      |   ^~~
a.cc:7:17: error: 's3' was not declared in this scope; did you mean 's2'?
    7 |   cout << s1+s2+s3 << endl;
      |                 ^~
      |                 s2
Language: C++

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

int main() {
  string s ;
  int a=0,i;
  cin >> s ;
  for(i=0;i<3;i++){
      if(s[i]=="1"){a=a+1;}
       }
  
  cout << a<<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"){a=a+1;}
Language: C++

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

int main() {
  string s ;
  int a=0,i=0;
  cin >> s ;
  for(i=0;i<3;i++){
      if(s[i]=="1"){a=a+1;}
       }
  
  cout << a<<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"){a=a+1;}
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: expected ';' before ')' token
    8 |   for(i=0,i<3,i++){
      |                  ^
      |                  ;
a.cc:13:1: error: expected primary-expression before '}' token
   13 | }
      | ^
a.cc:12:19: error: expected ')' before '}' token
   12 |   cout << a<<endl;
      |                   ^
      |                   )
   13 | }
      | ~                  
a.cc:8:6: note: to match this '('
    8 |   for(i=0,i<3,i++){
      |      ^
a.cc:13:1: error: expected primary-expression before '}' token
   13 | }
      | ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: expected ';' before ')' token
    8 |   for(i=0,i<3,i++){
      |                  ^
      |                  ;
a.cc:13:1: error: expected primary-expression before '}' token
   13 | }
      | ^
a.cc:12:19: error: expected ')' before '}' token
   12 |   cout << a<<endl;
      |                   ^
      |                   )
   13 | }
      | ~                  
a.cc:8:6: note: to match this '('
    8 |   for(i=0,i<3,i++){
      |      ^
a.cc:13:1: error: expected primary-expression before '}' token
   13 | }
      | ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'O' was not declared in this scope
    8 |   for(i=O,i<3,i++){
      |         ^
a.cc:13:1: error: expected primary-expression before '}' token
   13 | }
      | ^
a.cc:11:19: error: expected ')' before '}' token
   11 |   cout << a<<endl;
      |                   ^
      |                   )
   12 | 
   13 | }
      | ~                  
a.cc:8:6: note: to match this '('
    8 |   for(i=O,i<3,i++){
      |      ^
a.cc:13:1: error: expected primary-expression before '}' token
   13 | }
      | ^
Language: C++

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

int main() {
  string s ;
  int a=0,i=0;
  cin >> s ;
  for(i=O,i<3,i++){
      if(s[i]==1){a=a+1;}
       }
  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'O' was not declared in this scope
    8 |   for(i=O,i<3,i++){
      |         ^
a.cc:13:1: error: expected primary-expression before '}' token
   13 | }
      | ^
a.cc:10:9: error: expected ';' before '}' token
   10 |        }
      |         ^
      |         ;
......
   13 | }
      | ~        
a.cc:13:1: error: expected primary-expression before '}' token
   13 | }
      | ^
a.cc:10:9: error: expected ')' before '}' token
   10 |        }
      |         ^
      |         )
......
   13 | }
      | ~        
a.cc:8:6: note: to match this '('
    8 |   for(i=O,i<3,i++){
      |      ^
a.cc:13:1: error: expected primary-expression before '}' token
   13 | }
      | ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: expected primary-expression before '/' token
   10 |   x=/10;
      |     ^
Language: C++

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

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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'C' was not declared in this scope
    9 |   C=A/1-100*a-10*b;
      |   ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:6: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator>>'
    5 |   sin>>a>>b>>c;
      |   ~~~^~~
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:11:13: error: invalid operands of types 'const char [3]' and 'const char [3]' to binary 'operator+'
   11 |   cout<<"s1"+"s2"+"s3"<<endl;
      |         ~~~~^~~~~
      |         |    |
      |         |    const char [3]
      |         const char [3]
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: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() {
  int a, b, c,d;
  cin >> a ;
  b=a/100;
  c=a-(b*100)/10
  d=a%100;
  cout << b+c+d << endl;
}


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

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

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


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

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


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

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


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

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


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

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

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

#include <iostream>
using namespace std;

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


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

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

int main() {
  string s;
  int ans=0;
  rep(i,3){
    if(s[i]=='1') ans++;
  }
  cout<<ans<<ensl;
}


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

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

int main() {
  string s;
  int ans=0;
  rep(i,3){
    if(s[i]=='0') ans++;
  }
  cout<<ans<<ensl;
}


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

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

int main() {
  string s;
  int ans=0;
  rep(i,3){
    if(s[i]=='+') ans++;
  }
  cout<<ans<<ensl;
}


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

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

int main() {
  int a;

  // 変数aで入力を受け取る
  cin >> a;

  if (a == 0) {
    cout << 0 << endl;
  }
  else {
    if (a % 3 = 1) {
      cout << 1 << endl;
    }
    else if (a % 3 = 2) {
      cout << 2 << endl;
    }
    else {
      cout << 3 << endl;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: error: lvalue required as left operand of assignment
   14 |     if (a % 3 = 1) {
      |         ~~^~~
a.cc:17:16: error: lvalue required as left operand of assignment
   17 |     else if (a % 3 = 2) {
      |              ~~^~~
Language: C++

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
    7 |   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:7:28: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
    7 |   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:7:41: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
    7 |   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 s1s2s3;
  cin >> s1s2s3 >> R;
  cout << s1 / 100 + s2 / 10 + s3 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:20: error: 'R' was not declared in this scope
    6 |   cin >> s1s2s3 >> R;
      |                    ^
a.cc:7:11: error: 's1' was not declared in this scope; did you mean 'y1'?
    7 |   cout << s1 / 100 + s2 / 10 + s3 << endl;
      |           ^~
      |           y1
a.cc:7:22: error: 's2' was not declared in this scope
    7 |   cout << s1 / 100 + s2 / 10 + s3 << endl;
      |                      ^~
a.cc:7:32: error: 's3' was not declared in this scope
    7 |   cout << s1 / 100 + s2 / 10 + s3 << endl;
      |                                ^~
Language: C++

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

int main() {
  int ans=0;
  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 <bits/stdc++.h>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'if'
    8 |   if(s[1]=1){i++};
      |   ^~
a.cc:9:17: error: expected ';' before '}' token
    9 |   if(s[2]=1){i++};
      |                 ^
      |                 ;
a.cc:10:18: error: expected ';' before '}' token
   10 |    if(s[3]=1){i++};
      |                  ^
      |                  ;
Language: C++

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

int main() {
  string s;
  cin>>s;
  int i=0;
  if (s[0]="1") i++;
   if(s[1]="1") i++;
  if(s[3]-"1") i++;
  cout<<i<<endl;
  
  // ここにプログラムを追記
    
}


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

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

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

  // ここにプログラムを追記
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    7 |   cout<<s1,s2,s3<<endl;
      |               ~~^~~~~~
Language: C++

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

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

  cout << c << endl;
}


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

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

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

  cout << c << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |   if (s.at(0) == "1") {
      |       ~~~~~~~~^~~~~~
a.cc:9:8: error: expected ';' before '}' token
    9 |     c++
      |        ^
      |        ;
   10 |   }
      |   ~     
a.cc:12:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |   if (s.at(1) == "1") {
      |       ~~~~~~~~^~~~~~
a.cc:13:8: error: expected ';' before '}' token
   13 |     c++
      |        ^
      |        ;
   14 |   }
      |   ~     
a.cc:17:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |   if (s.at(2) == "1") {
      |       ~~~~~~~~^~~~~~
a.cc:18:8: error: expected ';' before '}' token
   18 |     c++
      |        ^
      |        ;
   19 |   }
      |   ~
Language: C++

#include <iostream>
#include <string>

int main(){
  std::string s;
  
  std::cin >> s;
  
  int counter = 0;
  
  if(s[0] == 1){counter++;}
    if(s[1] == 1){counter++;}
    if(s[2] == 1){counter++;}

  std::cout << counter;
  
  retunrn 0;
}


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

#include <iostream>
#include <streng>

int main(){
  std::string s;
  
  std::cin >> s;
  
  int counter = 0;
  
  if(s[0] == 1){counter++;}
    if(s[1] == 1){counter++;}
    if(s[2] == 1){counter++;}

  std::cout << counter;
  
  retunrn 0;
}


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

#include <iostream>
#include <string>

int main(){
  string s;
  
  std::cin >> s;
  
  int counter = 0;
  
  if(s[0] == 1){counter++;}
    if(s[1] == 1){counter++;}
    if(s[2] == 1){counter++;}

  std::cout << counter;
  
  retunrn 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string s;
      |   ^~~~~~
a.cc:5:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included 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:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:7:15: error: 's' was not declared in this scope
    7 |   std::cin >> s;
      |               ^
a.cc:17:3: error: 'retunrn' was not declared in this scope
   17 |   retunrn 0;
      |   ^~~~~~~
Language: C++

#include <iostream>
#include <streng>

int main(){
  string s;
  
  std::cin >> s;
  
  int counter = 0;
  
  if(s[0] == 1){counter++;}
    if(s[1] == 1){counter++;}
    if(s[2] == 1){counter++;}

  std::cout << counter;
  
  retunrn 0;
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'i' was not declared in this scope
    8 |   for(i=0;i<3;i++){
      |       ^
a.cc:11:4: error: expected '}' at end of input
   11 |   }
      |    ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

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

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int a;
  

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

#include <bits/stdc++.h>

using namespace std;

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

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

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

int main() {
  int s1, s2, s3;
  cin >> s1 >> s2 >> s3;
  int i;
  int sum = 0;
  for(int i = 0; i < 3; i++){
    if(c == 1){
      sum++
    }
    else{
    }
  }
  cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: 'c' was not declared in this scope
   10 |     if(c == 1){
      |        ^
a.cc:11:12: error: expected ';' before '}' token
   11 |       sum++
      |            ^
      |            ;
   12 |     }
      |     ~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
  int t=0;

string s;
  cin>>s;

  if(s[0]=="1") ++t;
  if(s[1]=="1") ++t;
  if(s[2]=="1") ++t;
cout<<t<<endl;
}

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

#include <iostream>
#include <string>
using namespace std;
int main(){
  int t=0;
  cin>>s;
string s;

  if(s[0]=="1") ++t;
  if(s[1]=="1") ++t;
  if(s[2]=="1") ++t;
cout<<t<<endl;
}

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:1: error: expected ',' or ';' before 'string'
    6 | string s;
      | ^~~~~~
a.cc:7:6: error: 's' was not declared in this scope
    7 |   if(s[0]=="1") ++t;
      |      ^
a.cc:8:6: error: 's' was not declared in this scope
    8 |   if(s[1]=="1") ++t;
      |      ^
a.cc:9:6: error: 's' was not declared in this scope
    9 |   if(s[2]=="1") ++t;
      |      ^
Language: C++

#include <bits/stdc++.h>
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:7:21: error: expected ';' before ':' token
    7 |   if(s[0]=='1')ans++:
      |                     ^
      |                     ;
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected '}' before 'else'
   10 |   else if (a == 001 || a == 010 || a == 100) {
      |   ^~~~
a.cc:8:17: note: to match this '{'
    8 |   if (a == 000) {
      |                 ^
a.cc:12:3: error: expected '}' before 'else'
   12 |   else if (a == 011 || a == 101 || a == 110) {
      |   ^~~~
a.cc:10:46: note: to match this '{'
   10 |   else if (a == 001 || a == 010 || a == 100) {
      |                                              ^
a.cc:14:3: error: expected '}' before 'else'
   14 |   else if (a == 111) {
      |   ^~~~
a.cc:12:46: note: to match this '{'
   12 |   else if (a == 011 || a == 101 || a == 110) {
      |                                              ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: 'i' was not declared in this scope
   12 |   if(date.at(i)==1){
      |              ^
Language: C++

#include <bits/stdc++>
using namespace std;
int main(){
  int N;
  cin>>N;
  vector<int>date(N);
  for(int i=0;i<N;i++){
    cin>>date.at(i);
  
  int count=0;
  if(date.at(i)==1){
    count++;
  }
  }
  cout<<count<<endl;
}

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


#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:7:5: error: 'cin' was not declared in this scope
    7 |     cin >> s;
      |     ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <string>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:12:5: error: 'cout' was not declared in this scope
   12 |     cout << counter << endl;
      |     ^~~~
a.cc:12:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:24: error: 'endl' was not declared in this scope
   12 |     cout << counter << endl;
      |                        ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <string>
  +++ |+#include <ostream>
    3 | using namespace std;
Language: C++

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

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

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

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

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

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


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

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

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

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string a;
      |   ^~~~~~
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >>a;
      |   ^~~
a.cc:6:9: error: 'a' was not declared in this scope
    6 |   cin >>a;
      |         ^
a.cc:13:3: error: 'cout' was not declared in this scope
   13 |   cout << b<<endl;
      |   ^~~~
a.cc:13:14: error: 'endl' was not declared in this scope
   13 |   cout << b<<endl;
      |              ^~~~
Language: C++

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

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

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

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

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

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inculude; did you mean #include?
    1 | #inculude <bits/stdc++.h>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> a;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inculude <bits/stdc++.h>
a.cc:12:3: error: 'cout' was not declared in this scope
   12 |   cout << b << endl;
      |   ^~~~
a.cc:12:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:16: error: 'endl' was not declared in this scope
   12 |   cout << b << endl;
      |                ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #inculude <bits/stdc++.h>
Language: C++

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

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

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inculude; did you mean #include?
    1 | #inculude <bits/stdc++.h>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> a;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inculude <bits/stdc++.h>
a.cc:12:3: error: 'cout' was not declared in this scope
   12 |   cout << b << endl;
      |   ^~~~
a.cc:12:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:16: error: 'endl' was not declared in this scope
   12 |   cout << b << endl;
      |                ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #inculude <bits/stdc++.h>
Language: C++

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

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

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inculude; did you mean #include?
    1 | #inculude <bits/stdc++.h>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> a;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inculude <bits/stdc++.h>
a.cc:12:3: error: 'cout' was not declared in this scope
   12 |   cout << b << endl;
      |   ^~~~
a.cc:12:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:16: error: 'endl' was not declared in this scope
   12 |   cout << b << endl;
      |                ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #inculude <bits/stdc++.h>
Language: C++

#include<iostream>
using namespace std;
 
int main(){
  char s[3];
  int count=0;
  
  cin >> s;
  
  for(int i=0;i<3;i++){
    if(s[i]=='1'){
      count++;
    }
  }
  

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

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

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

#include <stdio.h>
 
int main()
{
  char a[4];
  int i,k = 0;
  while (i < 4)
  {
    if (a[i] == '1')
      K++;
    i++;
  }
  printf("%d",k);
}

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

#include <stdio.h>

int main()
{
  char a[4];
  int i,k = 0;
  while (i < 4)
  {
    if (a[i] = '1')
      K++;
    i++;
  }
  printf("%d",k);
}

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: expected ';' before '}' token
    8 |   if(s[0]){c++}
      |               ^
      |               ;
a.cc:9:15: error: expected ';' before '}' token
    9 |   if(s[1]){c++}
      |               ^
      |               ;
a.cc:10:15: error: expected ';' before '}' token
   10 |   if(s[2]){c++}
      |               ^
      |               ;
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: expected ';' before '}' token
    8 |   if(s[0]){c++}
      |               ^
      |               ;
a.cc:9:15: error: expected ';' before '}' token
    9 |   if(s[1]){c++}
      |               ^
      |               ;
a.cc:10:15: error: expected ';' before '}' token
   10 |   if(s[2]){c++}
      |               ^
      |               ;
Language: C++

#include <stdio.h>
#include <iostream>
#include <cstdlib>
#include <iomanip>
#include <cmath>
#include <vector>
#include <string>
#include <algorithm>
#include <cstdlib>
#include <limits>
#include <numeric>
#include <queue>
#include <set>

using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<string> vs;
typedef vector<char> vc;
typedef queue<int, int> qii;
typedef pair<int, int> pii;

#define PI 3.14159265359
#define rep(i,a,b) for(int i=a;i<b;i++)
#define repz(i,n) rep(i,0,n)

//int型を受け取ってその桁数を返す
int check_digits(int n) {
	int digits = 0;
	while (n != 0) {
		n /= 10;
		digits++;
	}
	return digits;
}


//最大公約数を返す関数
int gcd(int n, int m) {
	while (n != 0) {
		if (n < m) swap(n, m);
		n = n % m;
	}
	return m;
}


//最小公倍数を返す関数
int mcd(int n) {
	return 0;
}


//2点間の距離を返す
float dis(int x1, int y1, int x2, int y2) {
	return sqrt(pow(abs(x1 - x2), 2) + pow(abs(y1 - y2), 2));
}


int main() {
	string temp;
	int ans = 0;
	cin >> temp;
	repz (i,3)if(temp[i] == '1') ans++;

	cout << ans << endl;

	・・system("pause");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:69:9: error: '\U000030fb\U000030fbsystem' was not declared in this scope
   69 |         ・・system("pause");
      |         ^~~~~~~~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: expected ';' before 'cout'
    7 |   t = s % 100
      |              ^
      |              ;
    8 |   cout << s / 100 + t / 10 + t % 10 << endl;
      |   ~~~~
Language: C

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

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



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

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

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



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

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

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



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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: expected unqualified-id before 'int'
    5 |   int a,int b,int c;
      |         ^~~
a.cc:6:8: error: 'b' was not declared in this scope
    6 |   0<=a,b,c<=1;
      |        ^
a.cc:6:10: error: 'c' was not declared in this scope
    6 |   0<=a,b,c<=1;
      |          ^
Language: C++

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

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

#include<stdio.h>
int main()
{
  int a=0;
　char s[3];
  scanf("%s",s);

    if(s[0]=='1'){
      a++;
    }
    if(s[1]=='1'){
      a++;
    }
    if(s[2]=='1'){
      a++;
    }
  
  printf("%d",a);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:5:1: error: stray '\343' in program
    5 | <U+3000>char s[3];
      | ^~~~~~~~
Language: C

#include<stdio.h>
int main()
{
　char s[3];
  int a=0;
  scanf("%s",s);

    if(s[0]=='1'){
      a++;
    }
    if(s[1]=='1'){
      a++;
    }
    if(s[2]=='1'){
      a++;
    }
  
  printf("%d",a);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:1: error: stray '\343' in program
    4 | <U+3000>char s[3];
      | ^~~~~~~~
Language: C

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

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

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

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

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

Compiler output:
main.c: In function 'main':
main.c:5:26: error: array size missing in 's'
    5 |                     char s[];
      |                          ^
main.c:7:34: error: expected ';' before 'if'
    7 |                   scanf("%s", &s)
      |                                  ^
      |                                  ;
    8 |                     // スペース区切りの整数の入力
    9 |                     if(s[0] == '1'){
      |                     ~~
Language: C

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

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