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

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

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

  
}


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

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

int ans;
string s;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: 'c' was not declared in this scope
   10 |         if(c[0]=='1') ans++;
      |            ^
a.cc:11:12: error: 'c' was not declared in this scope
   11 |         if(c[1]=='1') ans++;
      |            ^
a.cc:12:12: error: 'c' was not declared in this scope
   12 |         if(c[2]=='1') ans++;
      |            ^
Language: C++

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

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


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

#icnlude <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:1:2: error: invalid preprocessing directive #icnlude; did you mean #include?
    1 | #icnlude <bits/stdc++.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin >> s1 >> s2 >> s3;
      |         ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #icnlude <bits/stdc++.h>
a.cc:8:9: error: 'cout' was not declared in this scope
    8 |         cout << s1 + s2 + s3 << endl;
      |         ^~~~
a.cc:8:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:33: error: 'endl' was not declared in this scope
    8 |         cout << s1 + s2 + s3 << endl;
      |                                 ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #icnlude <bits/stdc++.h>
Language: C++

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

int main() {
    string a;
  cin>>a;
  int s;
  for(int i=0,i<2,i++){
   if(a,at(i)){
     s++;
   }
  }
  cout<<s<<endl;
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: expected ';' before '<' token
    8 |   for(int i=0,i<2,i++){
      |                ^
      |                ;
a.cc:8:16: error: expected primary-expression before '<' token
a.cc:8:22: error: expected ';' before ')' token
    8 |   for(int i=0,i<2,i++){
      |                      ^
      |                      ;
a.cc:9:9: error: 'at' was not declared in this scope; did you mean 'a'?
    9 |    if(a,at(i)){
      |         ^~
      |         a
Language: C++

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

int main() {
    string a;
  cin>>a;
  int s;
  for(int i=0,i<2,i++){
   if(a,at(i)==o){
     s++;
   }
  }
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: expected ';' before '<' token
    8 |   for(int i=0,i<2,i++){
      |                ^
      |                ;
a.cc:8:16: error: expected primary-expression before '<' token
a.cc:8:22: error: expected ';' before ')' token
    8 |   for(int i=0,i<2,i++){
      |                      ^
      |                      ;
a.cc:9:9: error: 'at' was not declared in this scope; did you mean 'a'?
    9 |    if(a,at(i)==o){
      |         ^~
      |         a
a.cc:9:16: error: 'o' was not declared in this scope
    9 |    if(a,at(i)==o){
      |                ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:14: error: expected initializer before 's3'
    5 |   int s1, s2 s3, b;
      |              ^~
a.cc:6:16: error: 's2' was not declared in this scope; did you mean 's1'?
    6 |   cin >> s1 >> s2 >> s3;
      |                ^~
      |                s1
a.cc:6:22: error: 's3' was not declared in this scope; did you mean 's1'?
    6 |   cin >> s1 >> s2 >> s3;
      |                      ^~
      |                      s1
a.cc:7:3: error: 'b' was not declared in this scope
    7 |   b = s1 + s2 + s3;
      |   ^
Language: C++

#include<bits/stdc++.h>
#define fast ios::sync_with_stdio(false), cin.tie(0);
#define ll long long
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define endl '\n'

using namespace std;

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

Compiler output:
a.cc:12:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   12 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:17:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   17 |     ans=(s[0]=='1')+(s[1]=='1')+(s[2]=='1');
      |     ^~~
      |     abs
Language: Java

import java.util.*;
 
class Main {
 public static void main (String[] args) {
   Scanner sc = new Scanner(System.in);

  int N = sc.nextInt();
  int a = sc.nextInt();
  int b = sc.nextInt();
  int c = sc.nextInt();
  int i;
  for ( i=0; i=>N; i = i+1){
    
   int d = a%2;
   int e = b%2;
   int f = c%2;
   
   if(d == 0 & e == 0 & f == 0)
   {}
    else {
    break;
    }
  }
   System.out.println(i);
  }
}


Compiler output:
Main.java:12: error: illegal start of expression
  for ( i=0; i=>N; i = i+1){
               ^
1 error
Language: C++

#include <iostream>
#include <string>

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'string' was not declared in this scope
    6 |   string s;
      |   ^~~~~~
a.cc:6: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:9:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 |   cin >> s;
      |   ^~~
      |   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:10: error: 's' was not declared in this scope
    9 |   cin >> s;
      |          ^
a.cc:13:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |   cout << cnt << 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:13:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   13 |   cout << cnt << endl;
      |                  ^~~~
      |                  std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: Java

import java.util.*;
 
class Main {
 public static void main (String[] args) {
   Scanner sc = new Scanner(System.in);

  int N = sc.nextInt();
  int a = sc.nextInt();
  int b = sc.nextInt();
  int c = sc.nextInt();
  int i;
  for ( i=0; i>N; i = i+1){
    
   int d = a%2;
   int e = b%2;
   int f = c%2;
   
   if(d == 0 & e == 0 & f == 0)
   {}
    else {
    break;
    }
  }
   System.out.plintln(i);
  }
}


Compiler output:
Main.java:24: error: cannot find symbol
   System.out.plintln(i);
             ^
  symbol:   method plintln(int)
  location: variable out of type PrintStream
1 error
Language: Java

import java.util.*;
 
class Main {
 public static void main (String[] args) {
   Scanner sc = new Scanner(System.in);

  int N = sc.nextInt();
  int a = sc.nextInt();
  int b = sc.nextInt();
  int c = sc.nextInt();

  for (int i=0; i>N; i = i+1){
    
   int d = a%2;
   int e = b%2;
   int f = c%2;
   
   if(d == 0 & e == 0 & f == 0)
   {}
    else {
    break;
    }
  }
   System.out.plintln(i);
  }
}


Compiler output:
Main.java:24: error: cannot find symbol
   System.out.plintln(i);
                      ^
  symbol:   variable i
  location: class Main
1 error
Language: Java

import java.util.*;
 
class Main {
 public static void main (String[] args) {
   Scanner sc = new Scanner(system.in);

  int N = sc.nextIn();
  int a = sc.nextIn();
  int b = sc.nextIn();
  int c = sc.nextIn();

  for (int i=1; i>N; i = i+1){
    
   int d = a%2;
   int e = b%2;
   int f = c%2;
   
   if(d == 0 & e == 0 & f == 0)
   {}
    else {
    break;
    }
  }
   
  }
}


Compiler output:
Main.java:5: error: cannot find symbol
   Scanner sc = new Scanner(system.in);
                            ^
  symbol:   variable system
  location: class Main
Main.java:7: error: cannot find symbol
  int N = sc.nextIn();
            ^
  symbol:   method nextIn()
  location: variable sc of type Scanner
Main.java:8: error: cannot find symbol
  int a = sc.nextIn();
            ^
  symbol:   method nextIn()
  location: variable sc of type Scanner
Main.java:9: error: cannot find symbol
  int b = sc.nextIn();
            ^
  symbol:   method nextIn()
  location: variable sc of type Scanner
Main.java:10: error: cannot find symbol
  int c = sc.nextIn();
            ^
  symbol:   method nextIn()
  location: variable sc of type Scanner
5 errors
Language: Java

import java.unit.*;
 
class Main {
 public static void main (String[] args) {
   Scnner sc = new Scanner(system.in);

  int N = sc.nextIn();
  int a = sc.nextIn();
  int b = sc.nextIn();
  int c = sc.nextIn();

  for (int i=1; i>N; i = i+1){
    
   int d = a%2;
   int e = b%2;
   int f = c%2;
   
   if(d == 0 & e == 0 & f == 0)
   {}
    else {
    break;
    }
  }
   
  }
}

Compiler output:
Main.java:1: error: package java.unit does not exist
import java.unit.*;
^
Main.java:5: error: cannot find symbol
   Scnner sc = new Scanner(system.in);
   ^
  symbol:   class Scnner
  location: class Main
Main.java:5: error: cannot find symbol
   Scnner sc = new Scanner(system.in);
                   ^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
   Scnner sc = new Scanner(system.in);
                           ^
  symbol:   variable system
  location: class Main
4 errors
Language: Java

import java.unit.*;
 
class Main {
 public static void main (String[] args) {
   Scnner sc = new Scanner(system.in);

  int N = sc.nextIn();
  int a = sc.nextIn();
  int b = sc.nextIn();
  int c = sc.nextIn();

  for (int i=1; i>N; i = i+1){
    
   int d = a%2;
   int e = b%2;
   int f = c%2;
   
   if(d == 0 & e == 0 & f == 0)
   {}
    else {
    break;
    }
  }
   
  }


Compiler output:
Main.java:25: error: reached end of file while parsing
  }
   ^
1 error
Language: Java

import java.unit.*;
 
class Main {
 public static void main (String[] args) {
   Scnner sc = new Scanner(system.in);

  int N = sc.nextIn();
  int a = sc.nextIn();
  int b = sc.nextIn();
  int c = sc.nextIn();

  for (int i=1; i>N; i+1;){
    
   int d = a%2;
   int e = b%2;
   int f = c%2;
   
   if(d == 0 & e == 0 & f == 0;)
   {}
    else {
    break;
    }
  }
   
  }


Compiler output:
Main.java:12: error: not a statement
  for (int i=1; i>N; i+1;){
                      ^
Main.java:12: error: ')' expected
  for (int i=1; i>N; i+1;){
                        ^
Main.java:12: error: illegal start of expression
  for (int i=1; i>N; i+1;){
                         ^
Main.java:18: error: ')' expected
   if(d == 0 & e == 0 & f == 0;)
                              ^
Main.java:18: error: illegal start of expression
   if(d == 0 & e == 0 & f == 0;)
                               ^
Main.java:20: error: 'else' without 'if'
    else {
    ^
Main.java:25: error: reached end of file while parsing
  }
   ^
7 errors
Language: Java

import java.unit.*;
 
class Main {
 public static void main (String[] args) {
   Scnner sc = new Scanner(system.in);

  int N = sc.nextIn();
  int a = sc.nextIn();
  int b = sc.nextIn();
  int c = sc.nextIn();

  for (int i=1, i>N, i+1;){
    
   int d = a%2;
   int e = b%2;
   int f = c%2;
   
   if(d == 0 & e == 0 & f == 0;)
   {}
    else {
    break;
    }
  }
   
  }


Compiler output:
Main.java:12: error: ';' expected
  for (int i=1, i>N, i+1;){
                 ^
Main.java:12: error: ';' expected
  for (int i=1, i>N, i+1;){
                   ^
Main.java:12: error: not a statement
  for (int i=1, i>N, i+1;){
                      ^
Main.java:12: error: ')' expected
  for (int i=1, i>N, i+1;){
                        ^
Main.java:12: error: illegal start of expression
  for (int i=1, i>N, i+1;){
                         ^
Main.java:18: error: ')' expected
   if(d == 0 & e == 0 & f == 0;)
                              ^
Main.java:18: error: illegal start of expression
   if(d == 0 & e == 0 & f == 0;)
                               ^
Main.java:20: error: 'else' without 'if'
    else {
    ^
Main.java:25: error: reached end of file while parsing
  }
   ^
9 errors
Language: C++

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

int main() {
  int s;
  int count = 0;
  cin >> s;
  if(s -= 100){
    count++;
  }
  if(s -= 10){
    count++;
  }
  if(s -= 1){
    count++;
  }
  cout << count << eol;
}


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

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

int main() {
  int s;
  int count = 0;
  cin >> s;
  if(s -= 100){
    count++:
  }
  if(s -= 10){
    count++:
  }
  if(s -= 1){
    count++:
  }
  cout << count << eol;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: expected ';' before ':' token
    9 |     count++:
      |            ^
      |            ;
a.cc:12:12: error: expected ';' before ':' token
   12 |     count++:
      |            ^
      |            ;
a.cc:15:12: error: expected ';' before ':' token
   15 |     count++:
      |            ^
      |            ;
a.cc:17:20: error: 'eol' was not declared in this scope
   17 |   cout << count << eol;
      |                    ^~~
Language: C++

n=input()
n=int(n)
og=n
flag=0
while(n>0):
    d=n%10
    n=n//10
    if(d==1):
      flag=flag+1
        
print(flag)
        
    
          
          

    


Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n=input()
      | ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: lvalue required as left operand of assignment
    6 |   if (a%3=0){
      |       ~^~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: lvalue required as left operand of assignment
    6 |   if (a%3=0){
      |       ~^~
a.cc:10:12: error: expected '(' before '{' token
   10 |     else if{
      |            ^
      |            (
a.cc:14:10: error: expected '(' before '{' token
   14 |   else if{
      |          ^
      |          (
Language: C++

include<bits/stdc++.h>
using namespace std;
int main(){
  int a;
  cin>>a;
  if (a%3=0){
    if(a=0){
      cout<<0<<endl;
    }
    else if{
      cout<<3<<endl;
    }
  }
  else if{
  cout<<a%3<<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: 'cin' was not declared in this scope
    5 |   cin>>a;
      |   ^~~
a.cc:6:8: error: lvalue required as left operand of assignment
    6 |   if (a%3=0){
      |       ~^~
a.cc:8:7: error: 'cout' was not declared in this scope
    8 |       cout<<0<<endl;
      |       ^~~~
a.cc:8:16: error: 'endl' was not declared in this scope
    8 |       cout<<0<<endl;
      |                ^~~~
a.cc:10:12: error: expected '(' before '{' token
   10 |     else if{
      |            ^
      |            (
a.cc:14:10: error: expected '(' before '{' token
   14 |   else if{
      |          ^
      |          (
Language: C++

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |         if(s[0] == "1") cnt ++;
a.cc:9:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |         if(s[1] == "1") cnt ++;
a.cc:10:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |         if(s[2] == "1") cnt ++;
a.cc:11:9: error: 'cont' was not declared in this scope; did you mean 'cnt'?
   11 |         cont << cnt << endl;
      |         ^~~~
      |         cnt
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 's1'
    6 |   cin s1 ;
      |      ^~~
      |      ;
a.cc:7:6: error: expected ';' before 's2'
    7 |   cin s2 ;
      |      ^~~
      |      ;
a.cc:8:6: error: expected ';' before 's3'
    8 |   cin s3 ;
      |      ^~~
      |      ;
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:6: error: expected ';' before 's1'
    6 |   cin s1 >> s2 >> s3 ;
      |      ^~~
      |      ;
Language: C++

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


int main() {
    string num;
    cin >> num;
    int res;
    for(int i = 0; i < 3; i++){
        res += int(num[i])
    }
    cout << res;
    cout << endl;    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:27: error: expected ';' before '}' token
   16 |         res += int(num[i])
      |                           ^
      |                           ;
   17 |     }
      |     ~
Language: C++

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


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

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


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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
 string str;
  cin >> str;
  int N =0;
  if(str.at(0) == 1){
    N++
  }
  if(str.at(1) == 1){
    N++
  }
  if(str.at(2) == 1){
    N++
  }
  cout << N << endl;
}

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

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

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

#include<cstdio>
#include<cstring>
using namesapce std;
int sum=0;
char s[100001];
int n;
int main()
{
	scanf("%s",s);
	n=strlen(s);
	for(int i=0;i<n;i++)
	{
		sum+=s[i]-'0';
	}
	printf("%d",sum);
	return 0;
}

Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'namesapce'
    3 | using namesapce std;
      |       ^~~~~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:33: error: expected ';' before 'cout'
    7 |     a=a[0]-'0'+a[1]-'0'+a[2]-'0'
      |                                 ^
      |                                 ;
    8 |     cout<<a;
      |     ~~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
    string s;
    cin>>s;
    s=s[0]-'0'+s[1]-'0'+s[2]-'0'
    cout<<s;
    return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:7:33: error: expected ';' before 'cout'
    7 |     s=s[0]-'0'+s[1]-'0'+s[2]-'0'
      |                                 ^
      |                                 ;
    8 |     cout<<s;
      |     ~~~~                         
a.cc:9:14: error: expected '}' at end of input
    9 |     return 0;
      |              ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
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:6:6: error: expected ';' before 'a'
    6 |   cin a >> b >> c;
      |      ^~
      |      ;
Language: C++

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

int main() {
  // ここにプログラムを追記
  double a, b c ;
   
  cin >> a >> b >> c;
  

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


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

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

int main() {
  string s;
  cin >> s;
  int count = 0;
  for (char& c : str) {
    if (c == '1') count++;
  }
  cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: 'str' was not declared in this scope; did you mean 'std'?
    8 |   for (char& c : str) {
      |                  ^~~
      |                  std
Language: C++

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

int main(){

string s ;
cin >> s ;
int n = 0;

for(int i = 0; i<2; i++){
      if (s.at(i) == "1") n++;
 }
cout << n <<endl;

}


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

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

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

int main() {
  int s1s2s3;
  cin >> s1s2s3;
  cout << s1s2s3%9 << endl;


Compiler output:
a.cc:5:7: error: stray '#' in program
    5 |   int #include <bits/stdc++.h>
      |       ^
a.cc: In function 'int main()':
a.cc:5:16: error: expected initializer before '<' token
    5 |   int #include <bits/stdc++.h>
      |                ^
a.cc:8:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    8 | int main() {
      |         ^~
a.cc:8:9: note: remove parentheses to default-initialize a variable
    8 | int main() {
      |         ^~
      |         --
a.cc:8:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:8:12: error: a function-definition is not allowed here before '{' token
    8 | int main() {
      |            ^
a.cc:11:28: error: expected '}' at end of input
   11 |   cout << s1s2s3%9 << endl;
      |                            ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int Z,A,B,C;
  cin >> Z;
  A = Z%100;
  B = (Z-A)/10%10
  C = ((Z-A)/10-B)
  cout << A+B+C << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: expected ';' before 'C'
    8 |   B = (Z-A)/10%10
      |                  ^
      |                  ;
    9 |   C = ((Z-A)/10-B)
      |   ~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: lvalue required as left operand of assignment
    7 |         N%100=a
      |         ~^~~~
Language: Java

import java.util.*;

class Main{
	public static void main(String[] args) throws java.lang.Exception{
		BufferdReader br = new BufferedReader(new InputStreamReader(System.in));
		String input = br.readLine();
		System.out.println(
			Arrays.stream(input.split(""))
			.filter(i -> i.equals("1"))
			.count()
		);
	}
}



Compiler output:
Main.java:5: error: cannot find symbol
		BufferdReader br = new BufferedReader(new InputStreamReader(System.in));
		^
  symbol:   class BufferdReader
  location: class Main
Main.java:5: error: cannot find symbol
		BufferdReader br = new BufferedReader(new InputStreamReader(System.in));
		                       ^
  symbol:   class BufferedReader
  location: class Main
Main.java:5: error: cannot find symbol
		BufferdReader br = new BufferedReader(new InputStreamReader(System.in));
		                                          ^
  symbol:   class InputStreamReader
  location: class Main
3 errors
Language: C++

#include<iostream>#include<string>usingnamespacestd;intans;string s;intmain(){cin>>s;if(s[0]== 1 ) ans++;if(s[1]== 1 ) ans++;if(s[2]== 1 ) ans++;cout<<ans<<endl;}

Compiler output:
a.cc:1:19: warning: extra tokens at end of #include directive
    1 | #include<iostream>#include<string>usingnamespacestd;intans;string s;intmain(){cin>>s;if(s[0]== 1 ) ans++;if(s[1]== 1 ) ans++;if(s[2]== 1 ) ans++;cout<<ans<<endl;}
      |                   ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: expected initializer before '/' token
    7 |   int a/100 =A;
      |        ^
a.cc:8:8: error: expected initializer before '-' token
    8 |   int a-A*100 =B;
      |        ^
a.cc:9:8: error: expected initializer before '/' token
    9 |   int B/10 =C;
      |        ^
a.cc:10:8: error: expected initializer before '-' token
   10 |   int B-C*10 =D;
      |        ^
a.cc:12:13: error: 'A' was not declared in this scope
   12 |     cout << A+C+D << endl;
      |             ^
a.cc:12:15: error: 'C' was not declared in this scope
   12 |     cout << A+C+D << endl;
      |               ^
a.cc:12:17: error: 'D' was not declared in this scope
   12 |     cout << A+C+D << endl;
      |                 ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: expected initializer before '/' token
    7 |   int a/100 =A
      |        ^
Language: Java

import java.io.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main{
  public static void main(String[] args)
  {
    try
    {
    Scanner reader =
    new Scanner(System.in);
    int a =reader.nextInt();
    int b =reader.nextInt();
    int c =reader.nextInt();
    String s =sc.next
    
  }catch (IOException e)
  {
    e.printStackTrace();
  }
}

}

Compiler output:
Main.java:16: error: ';' expected
    String s =sc.next
                     ^
1 error
Language: Java

import java.io.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Mian{
  public static void main(String[] args)
  {
    try
    {
    Scanner reader =
    new Scanner(System.in);
    int a =reader.nextInt();
    int b =reader.nextInt();
    int c =reader.nextInt();
    String s =sc.next
    
  }catch (IOException e)
  {
    e.printStackTrace();
  }
}

}


Compiler output:
Main.java:16: error: ';' expected
    String s =sc.next
                     ^
1 error
Language: Java

import java.util.*;

class Main{
	public static void main(String[] args) throws java.lang.Exception{
		BufferdReader br = new BufferedReader(new InputStreamReader(System.in));
		String input = br.readLine();
		System.out.println(
			Arrays.stream(input.split(""))
			.filter(i -> i.equals("1"))
			.count()
		);
	}
}

Compiler output:
Main.java:5: error: cannot find symbol
		BufferdReader br = new BufferedReader(new InputStreamReader(System.in));
		^
  symbol:   class BufferdReader
  location: class Main
Main.java:5: error: cannot find symbol
		BufferdReader br = new BufferedReader(new InputStreamReader(System.in));
		                       ^
  symbol:   class BufferedReader
  location: class Main
Main.java:5: error: cannot find symbol
		BufferdReader br = new BufferedReader(new InputStreamReader(System.in));
		                                          ^
  symbol:   class InputStreamReader
  location: class Main
3 errors
Language: C++

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

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

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

Compiler output:
a.cc:2:2: error: invalid preprocessing directive #incude; did you mean #include?
    2 | #incude<string>
      |  ^~~~~~
      |  include
Language: Java

import java.util.*;

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

Compiler output:
Main.java:8: error: cannot find symbol
      System.out.printIn(s.length());
                ^
  symbol:   method printIn(int)
  location: variable out of type PrintStream
1 error
Language: Java

import java.util.*;

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


Compiler output:
Main.java:10: error: reached end of file while parsing
  }
   ^
1 error
Language: Java

import java.util.*;

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


Compiler output:
Main.java:8: error: cannot find symbol
      System.out.printIn(s.length());
                ^
  symbol:   method printIn(int)
  location: variable out of type PrintStream
1 error
Language: Java

import java.util.*;

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

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

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

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |         if (s[i] == "1") {
a.cc:12:21: error: expected ';' before '}' token
   12 |             answer++
      |                     ^
      |                     ;
   13 |         }
      |         ~
Language: Java

import java.util.*;

class Main{
	public static void main(Stirng[] args){
		Scanner sc = new Scanner(System.in);
		
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		
		int array[] = new int[3];
		array[0] = a;
		array[1] = b;
		array[2] = c;
		int x = 0;
		
		for(int s:array){
			if(s==1){
				x = x + 1;
			}
		}
		System.out.println(x);
	}
}
		

Compiler output:
Main.java:4: error: cannot find symbol
	public static void main(Stirng[] args){
	                        ^
  symbol:   class Stirng
  location: class Main
1 error
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'count' was not declared in this scope
    9 |     cout << count(S.begin(), S.end(), '1') << endl;
      |             ^~~~~
Language: Java

import java.util.*;

class Main{
	public static void main(Stirng[] args){
		Scanner sc = new Scanner(System.in);
		
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		
		int Array array[] = new array;
		array = [a,b,c];
		int x = 0;
		
		for(int s:array){
			if(s==1){
				x = x + 1;
			}
		}
		System.out.println(x);
	}
}
		

Compiler output:
Main.java:11: error: ';' expected
		int Array array[] = new array;
		         ^
Main.java:11: error: not a statement
		int Array array[] = new array;
		               ^
Main.java:11: error: ';' expected
		int Array array[] = new array;
		                 ^
Main.java:11: error: '(' or '[' expected
		int Array array[] = new array;
		                             ^
Main.java:12: error: illegal start of expression
		array = [a,b,c];
		        ^
Main.java:12: error: not a statement
		array = [a,b,c];
		         ^
Main.java:12: error: ';' expected
		array = [a,b,c];
		          ^
Main.java:12: error: not a statement
		array = [a,b,c];
		           ^
Main.java:12: error: ';' expected
		array = [a,b,c];
		            ^
Main.java:12: error: not a statement
		array = [a,b,c];
		             ^
Main.java:12: error: ';' expected
		array = [a,b,c];
		              ^
11 errors
Language: Java

import java.util.*;

class Main{
	public static void main(Stirng[] args){
		Scanner sc = new Scanner(System.in);
		
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		
		int Array array = new array[];
		array = a,b,c;
		int x = 0;
		
		for(int s:array){
			if(s==1){
				x = x + 1;
			}
		}
		System.out.println(x);
	}
}

Compiler output:
Main.java:11: error: ';' expected
		int Array array = new array[];
		         ^
Main.java:11: error: array dimension missing
		int Array array = new array[];
		                             ^
Main.java:12: error: ';' expected
		array = a,b,c;
		         ^
Main.java:12: error: not a statement
		array = a,b,c;
		          ^
Main.java:12: error: ';' expected
		array = a,b,c;
		           ^
Main.java:12: error: not a statement
		array = a,b,c;
		            ^
6 errors
Language: C++

#include <iostream>
#include <vector>
using namespace std;
 
int main()
{
  vector<int> S(3);
  for(int i=0;i<S.size();i++) cin >> S[i];
  int a;
  a = count(S.begin(), S.end(), 1);
  cout << a << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: 'count' was not declared in this scope
   10 |   a = count(S.begin(), S.end(), 1);
      |       ^~~~~
Language: C++

#include <iostream>
#include <vector>
using namespace std;
 
int main()
{
  vector<int> S(3);
  for(int i=0;i<S.size();i++) cin >> S[i];
  cout << std::count(S.begin(), S.end(), 1) << endl;
  return 0;
}


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

#include <iostream>
#include <vector>
using namespace std;
 
int main()
{
  vector<int> S(3);
  for(int i=0;i<S.size();i++) cin >> S[i];
  cout << S.count(S.begin(), S.end(), 1) << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'class std::vector<int>' has no member named 'count'
    9 |   cout << S.count(S.begin(), S.end(), 1) << endl;
      |             ^~~~~
Language: C++

#include <iostream>
#include <vector>
using namespace std;
 
int main()
{
  vector<int> S(3);
  for(int i=0;i<S.size();i++) cin >> S[i];
  cout << count(S.begin(), S.end(), 1) << endl;
  return 0;
}

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

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

inr main()
{
  vector<char> S;
  cin >> S;
  cout << count(S.begin(), S.end(), '1') << endl;
  return 0;
}

Compiler output:
a.cc:5:1: error: 'inr' does not name a type; did you mean 'int'?
    5 | inr main()
      | ^~~
      | int
Language: C++

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

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

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

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

int main(){
  string s;
  int caunt = 0;
  cin >> s1;
  if(s[0] == '1') caunt++;
  if(s[1] == '1') caunt++;
  if(s[2] == '1') caunt++;
  cout << caunt << flush;
  return 0;
}

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

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

int main(){
  string s;
  int caunt = 0;
  cin >> s1;
  if(s[0] == "1") caunt++;
  if(s[1] == "1") caunt++;
  if(s[2] == "1") caunt++;
  cout << caunt << flush;
  return 0;
}


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

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

int main() {
  string s ;
  int a=0;
  cin >> s ;
  for(int 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() {
  // ここにプログラムを追記
  int S,s_1,s_2,s_3;
  cin>>S;
  100*s_1+10*s_2+s_3=S;
  cout<<s_1+s_2+s_3<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: lvalue required as left operand of assignment
    8 |   100*s_1+10*s_2+s_3=S;
      |   ~~~~~~~~~~~~~~^~~~
Language: C++

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

int main() {
  // ここにプログラムを追記
  int S,s_1, s_2, s_3;
  cin>>S;
  100*s_1+10*s_2+s_3=S;
  cout<<s_1+s_2+s_3<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: lvalue required as left operand of assignment
    8 |   100*s_1+10*s_2+s_3=S;
      |   ~~~~~~~~~~~~~~^~~~
Language: C++

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

int main() {
  // ここにプログラムを追記
  int S,s_1,s_2,s_3;
  cin>>S;
  100*s_1+10*s_2+s_3=S;
  cout<<s1+s2+s3<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: lvalue required as left operand of assignment
    8 |   100*s_1+10*s_2+s_3=S;
      |   ~~~~~~~~~~~~~~^~~~
a.cc:9:9: error: 's1' was not declared in this scope; did you mean 's_1'?
    9 |   cout<<s1+s2+s3<<endl;
      |         ^~
      |         s_1
a.cc:9:12: error: 's2' was not declared in this scope; did you mean 's_2'?
    9 |   cout<<s1+s2+s3<<endl;
      |            ^~
      |            s_2
a.cc:9:15: error: 's3' was not declared in this scope; did you mean 's_3'?
    9 |   cout<<s1+s2+s3<<endl;
      |               ^~
      |               s_3
Language: C++

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

int main() {
  // ここにプログラムを追記
  int S,s1,s2,s3;
  cin>>S;
  100*s1+10*s2+s3 = S;
  cout<<s1+s2+s3<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: lvalue required as left operand of assignment
    8 |   100*s1+10*s2+s3 = S;
      |   ~~~~~~~~~~~~^~~
Language: C++

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

int main() {
  // ここにプログラムを追記
  int S,s1,s2,s3;
  cin>>S;
  100*s1+10*s2+s3=S;
  cout<<s1+s2+s3<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: lvalue required as left operand of assignment
    8 |   100*s1+10*s2+s3=S;
      |   ~~~~~~~~~~~~^~~
Language: C++

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

int main() {
  // ここにプログラムを追記
  int s,s1,s2,s3;
  cin>>s;
  100*s1+10*s2+s3=s;
  cout<<s1+s2+s3<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: lvalue required as left operand of assignment
    8 |   100*s1+10*s2+s3=s;
      |   ~~~~~~~~~~~~^~~
Language: C++

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

int main() {
  // ここにプログラムを追記
  int s,s1,s2,s3;
  cin>>s;
  s=100*s1+10*s2+s3
  cout<<s1+s2+s3<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: expected ';' before 'cout'
    8 |   s=100*s1+10*s2+s3
      |                    ^
      |                    ;
    9 |   cout<<s1+s2+s3<<endl;
      |   ~~~~
Language: C++

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

int main() {
  int a,b,c,d;
  cin>>a;
  b=a%100
  c=(a-100*b)%10
  d=a-100*b-10*c
  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-100*b)%10
      |   ~
Language: Java

import java.util*;

class Main{

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

Compiler output:
Main.java:1: error: ';' expected
import java.util*;
                ^
1 error
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		sc.next
          .split()
          .stream()
          .mapToInt(Integer::parseInt)
          .sum();
      
		System.out.println(result);
	}
}


Compiler output:
Main.java:6: error: cannot find symbol
		sc.next
		  ^
  symbol:   variable next
  location: variable sc of type Scanner
Main.java:12: error: cannot find symbol
		System.out.println(result);
		                   ^
  symbol:   variable result
  location: class Main
2 errors
Language: C++

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

int main() {
  int r;
  string s;
  
  cin >> s;
  
  for (int i = 0; i < s.size(); i++) {
    char c = s.substr(i, 1);
    r += c - '0';
  }
  
  cout << r << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:22: error: cannot convert 'std::__cxx11::basic_string<char>' to 'char' in initialization
   11 |     char c = s.substr(i, 1);
      |              ~~~~~~~~^~~~~~
      |                      |
      |                      std::__cxx11::basic_string<char>
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:23: error: expected ';' before 's1'
    8 |   s0 = s / 1000 * 1000
      |                       ^
      |                       ;
    9 |   s1 = (s - s0) / 100 * 100;
      |   ~~