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

#include <bits/stdc++.h>
#include <cstdio>
#include <cstdlib>
using namespace std;
int main() {
#ifndef ONLINE_JUDGE
    freopen("in.txt","r",stdin);
    //freopen("out.txt","w",stdout);
#endif // ONLINE_JUDGE
    char s[100];
    gets(s);
    for(int i=0 ; s[i] ; i++){
        if(s[i]==',') purchar(' ');
        else putchar(s[i]);
    }
    putchar('\n');
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
   11 |     gets(s);
      |     ^~~~
      |     getw
a.cc:13:23: error: 'purchar' was not declared in this scope; did you mean 'putchar'?
   13 |         if(s[i]==',') purchar(' ');
      |                       ^~~~~~~
      |                       putchar
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
    //freopen("in.txt","r",stdin);
    char s[20];
    gets(s);
    for(int i=0; i<20; ++i)
    {
        if(s[i]==',') s[i]=' ';
    }
    puts(s);
    return 0;
}


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

#include <bits/stdc++.h>
using namespace std;
int main()
{
    freopen("in.txt","r",stdin);
    char s[20];
    gets(s);
    for(int i=0; i<20; ++i)
    {
        if(s[i]==',') s[i]=' ';
    }
    puts(s);
    return 0;
}


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

#include<cstdio>

#define rep(i,a,b) for (int i = a ; i < b ; i ++)

using namespace std;

char a[100];

int main()
{
    gets(a);
    a[5] = ' ';
    a[13] = ' ';
    puts(a);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
   11 |     gets(a);
      |     ^~~~
      |     getw
Language: C++

#include<bits/stdc++.h>

#define rep(i,a,b) for (int i = a ; i < b ; i ++)

using namespace std;

char a[100];

int main()
{
    gets(a);
    a[5] = ' ';
    a[13] = ' ';
    puts(a);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
   11 |     gets(a);
      |     ^~~~
      |     getw
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main()
{
    char s[25];
    gets(s);
    s[5] = ' ';
    s[12] = ' ';
    puts(s);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    8 |     gets(s);
      |     ^~~~
      |     getw
Language: C++

#include <iostream>
#include <cstdio>
#include <string>
#include <cstring>
#include <stdlib.h>
#include <math.h>
#include <ctype.h>
#include <queue>
#include <map>
#include <set>
#include<string.h>
#include <algorithm>
using namespace std;

int main()
{
    char s[25];
    gets(s);
    for(int i=0;s[i]!='\0';++i)
    {
        if(s[i]==',')
            s[i]=' ';
    }
    puts(s);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
   18 |     gets(s);
      |     ^~~~
      |     getw
Language: C++

#include <iostream>
#include <cstdio>
#include <string>
#include <cstring>
#include <stdlib.h>
#include <math.h>
#include <ctype.h>
#include <queue>
#include <map>
#include <set>
#include <algorithm>
using namespace std;

int main()
{
    char s[25];
    gets(s);
    for(int i=0;s[i]!='\0';++i)
    {
        if(s[i]==',')
            s[i]=' ';
    }
    puts(s);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
   17 |     gets(s);
      |     ^~~~
      |     getw
Language: C++

#include <iostream>
#include <cstring>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <string>
#include <map>
#include <stack>
#include <queue>
#include <vector>
#define inf 0x3f3f3f3f
#define met(a,b) memset(a,b,sizeof a)
#define pb push_back
typedef long long ll;
using namespace std;
const int N = 5e2+10;
const int M = 24005;
const ll mod=1e9+7;
using namespace std;
char str[N];
int main(){
    gets(str);
    for(int i=0;i<strlen(str);i++){
        if(str[i]==',')str[i]=' ';
    }
    puts(str);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
   22 |     gets(str);
      |     ^~~~
      |     getw
Language: C++

#include <bits/stdc++.h>

int main() {
  string str;
  std::cin >> str;
  for (int i = 0; i < str.length(); i++) {
    if (str[i] == ',') {
      str[i] = ' ';
    }
  }
  std::cout << str << std::endl;

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope
    4 |   string str;
      |   ^~~~~~
a.cc:4:3: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:5:15: error: 'str' was not declared in this scope; did you mean 'std'?
    5 |   std::cin >> str;
      |               ^~~
      |               std
Language: C++

#include <bits/stdc++.h>

int main() {
  string str;
  std::cin >> str;
  for (int i = 0: i < str.length(); i++) {
    if (str[i] == ',') {
      str[i] = ' ';
    }
  }
  std::cout << str << std::endl;

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope
    4 |   string str;
      |   ^~~~~~
a.cc:4:3: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:5:15: error: 'str' was not declared in this scope; did you mean 'std'?
    5 |   std::cin >> str;
      |               ^~~
      |               std
a.cc:6:14: error: initializer in range-based 'for' loop
    6 |   for (int i = 0: i < str.length(); i++) {
      |              ^
a.cc:6:35: error: expected ')' before ';' token
    6 |   for (int i = 0: i < str.length(); i++) {
      |       ~                           ^
      |                                   )
a.cc:6:37: error: 'i' was not declared in this scope
    6 |   for (int i = 0: i < str.length(); i++) {
      |                                     ^
Language: Java

import java.util.*;

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

Compiler output:
Main.java:7: error: incompatible types: char cannot be converted to String
		String[] split = s.split(',');
		                         ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: C++

#include<iostream>
#include<string>

using namespace std;

void main() {
	string str;
	cin >> str;
	for (int i = 0; i < 19; i++) {
		if (i == 5 || i == 13) {
			cout << " ";
		}
		else {
			cout << str[i];
		}
	}
	cout << endl;
}

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

public class Beg54A {
	public static void main(String[] args) {
		final String input = args[0];
		for (int i = 0; i < input.length(); i++)
			System.out.print(input.charAt(i) == ',' ? ' ' : input.charAt(i));
	}
}


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

#include <stdio.h>

int main(){

 char s;
 s = "happy,newyear,enjoy";

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
    6 |  s = "happy,newyear,enjoy";
      |      ^~~~~~~~~~~~~~~~~~~~~
      |      |
      |      const char*
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main() {

	string s;

	cin >> s;
	std::replace(s.begin(), s.end(), ',', ' ');
	cout << s << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: 'replace' is not a member of 'std'
   11 |         std::replace(s.begin(), s.end(), ',', ' ');
      |              ^~~~~~~
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main() {

	string s;

	cin >> s;
	replace(s.begin(), s.end(), ',', ' ');
	cout << s << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'replace' was not declared in this scope
   11 |         replace(s.begin(), s.end(), ',', ' ');
      |         ^~~~~~~
Language: C

s = input()
print(s.replace(',',' '))

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | s = input()
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
main.c:1:5: error: implicit declaration of function 'input' [-Wimplicit-function-declaration]
    1 | s = input()
      |     ^~~~~
main.c:1:5: error: initializer element is not constant
main.c:2:1: error: expected ',' or ';' before 'print'
    2 | print(s.replace(',',' '))
      | ^~~~~
Language: C++

int main(void){
    string s;
    cin >> s;
    s[5]=' ',s[13]=' ';
    cout << s << endl;
    return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:2:5: error: 'string' was not declared in this scope
    2 |     string s;
      |     ^~~~~~
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> s;
      |     ^~~
a.cc:3:12: error: 's' was not declared in this scope
    3 |     cin >> s;
      |            ^
a.cc:5:5: error: 'cout' was not declared in this scope
    5 |     cout << s << endl;
      |     ^~~~
a.cc:5:18: error: 'endl' was not declared in this scope
    5 |     cout << s << endl;
      |                  ^~~~
a.cc:6:14: error: expected '}' at end of input
    6 |     return 0;
      |              ^
a.cc:1:15: note: to match this '{'
    1 | int main(void){
      |               ^
Language: C++

int main(void){
    string s;
    cin >> s;
    s[5]=' ',s[13]=' ';
    cout << s << end1;
    return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:2:5: error: 'string' was not declared in this scope
    2 |     string s;
      |     ^~~~~~
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> s;
      |     ^~~
a.cc:3:12: error: 's' was not declared in this scope
    3 |     cin >> s;
      |            ^
a.cc:5:5: error: 'cout' was not declared in this scope
    5 |     cout << s << end1;
      |     ^~~~
a.cc:5:18: error: 'end1' was not declared in this scope
    5 |     cout << s << end1;
      |                  ^~~~
a.cc:6:14: error: expected '}' at end of input
    6 |     return 0;
      |              ^
a.cc:1:15: note: to match this '{'
    1 | int main(void){
      |               ^
Language: C++

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<string>
#include<cstring>
#include<vector>
#include<map>
#include<list>
#include<stack>
#include<queue>
#include<climits> //INT_MIN/MAX
using namespace std;

#define FOR(i,s,e) for(ll (i)=(s);(i)<(e);(i)++)
#define FORR(i,s,e) for(ll (i)=(s);(i)>(e);(i)--)
#define MOD 1000000007
#define llong long long
#define debug(x) cout<<#x<<": "<<x<<endl
typedef long long ll;
llong N;

/* 2017/01/18 問題 -----  abc051 a /Link ----- */
/* -----解説等-----
問題:


*/

int main()
{
    cin.tie(0);
    ios_base::sync_with_stdio(false);


    string S;
    cin >> S;
    FOR(i, 0, 5) {
        cout << S[i];
    }
    cout << " ";
    FOR(i, 6, 13) {
        cout << S[i] ;
    }
    cout << " ";

    FOR(i, 14, 19) {
        cout << S[i] <<;
    }
    cout << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:48:24: error: expected primary-expression before ';' token
   48 |         cout << S[i] <<;
      |                        ^
Language: C++

def slv(string):
    ret = ''
    for i in range(len(string)):
        if string[i] == ',':
            ret += ' '
        else:
            ret += string[i]

if __name__ == '__main__':
    s = input()
    print(slv(s))

Compiler output:
a.cc:2:11: error: empty character constant
    2 |     ret = ''
      |           ^~
a.cc:9:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
    9 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:1:1: error: 'def' does not name a type
    1 | def slv(string):
      | ^~~
Language: C++

#include <iostream>#include<string>using namespace std;string a,b,c;int main() {cin>>a>>b>>c;cout<<a<<" "<<b<<" "<<c;return 0;}

Compiler output:
a.cc:1:20: warning: extra tokens at end of #include directive
    1 | #include <iostream>#include<string>using namespace std;string a,b,c;int main() {cin>>a>>b>>c;cout<<a<<" "<<b<<" "<<c;return 0;}
      |                    ^
/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 <iostream>
#include<string>
using namespace std;
int main(){
string s;
cin>>s;
s[5]=[13]=' ';
cout<<s<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: expected identifier before numeric constant
    7 | s[5]=[13]=' ';
      |       ^~
a.cc: In lambda function:
a.cc:7:10: error: expected '{' before '=' token
    7 | s[5]=[13]=' ';
      |          ^
a.cc: In function 'int main()':
a.cc:7:11: error: no match for 'operator=' (operand types are 'main()::<lambda()>' and 'char')
    7 | s[5]=[13]=' ';
      |           ^~~
a.cc:7:9: note: candidate: 'main()::<lambda()>& main()::<lambda()>::operator=(const main()::<lambda()>&)' (deleted)
    7 | s[5]=[13]=' ';
      |         ^
a.cc:7:9: note:   no known conversion for argument 1 from 'char' to 'const main()::<lambda()>&'
Language: C++

#include <iostream>
int main() {
 char str[20];
 cin >> str;
 str[5] = str[13] = ' ';
 cout << str << endl;
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:2: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |  cin >> str;
      |  ^~~
      |  std::cin
In file included 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:6:2: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |  cout << str << 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:6:17: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |  cout << str << endl;
      |                 ^~~~
      |                 std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
	string s;	cin>>s;
	for(int i=0;i<s.size();i++){
		cout<<(s[i]==','?" ":s[i]);
	}
	cout<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:33: error: operands to '?:' have different types 'const char*' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
    7 |                 cout<<(s[i]==','?" ":s[i]);
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
	string s;	cin>>s;
	for(int i=0;i<s.size();i++){
		cout<<(s[i]==','?" ",s[i]);
	}
	cout<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:42: error: expected ':' before ')' token
    7 |                 cout<<(s[i]==','?" ",s[i]);
      |                                          ^
      |                                          :
a.cc:7:42: error: expected primary-expression before ')' token
Language: Java

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
Scanner sc=new Scanner(System.in);
int c=0,x,y,z,k,s;
k=sc.nextInt();
s=sc.nextInt();
for(x=0;x<=s;i++)
{
	for(y=0;y<=s;y++)
	{
		for(z=0;z<=s;z++)
		{
			if((x+y+z)==s)
              c++;
		}
	}

}

System.out.println(c);
	}
}


Compiler output:
Main.java:5: error: cannot find symbol
Scanner sc=new Scanner(System.in);
^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
Scanner sc=new Scanner(System.in);
               ^
  symbol:   class Scanner
  location: class Main
Main.java:9: error: cannot find symbol
for(x=0;x<=s;i++)
             ^
  symbol:   variable i
  location: class Main
3 errors
Language: C++

#include <iostream>
#include <string>

int main() {
string s;
std::cin >> s;

for (int i=0;i<s.size();i++){
if(i==5||i==13) std::cout << ' ';
else std::cout << s[i];
}
std::cout << std::endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:1: error: 'string' was not declared in this scope
    5 | string s;
      | ^~~~~~
a.cc:5:1: 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:6:13: error: 's' was not declared in this scope
    6 | std::cin >> s;
      |             ^
Language: C++

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

int main()
{
    char S[19];
    cin >> S;
    S[5] == ' ';
    S[13] == ' ';
    cout << s << endl;
    return 0;
}




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

#define _USE_MATH_DEFINES
#include<stdio.h>
#include<string>
#include<iostream>
#include<cctype>
#include<cstdio>
#include<vector>
#include<stack>
#include<queue>
#include <algorithm>
#include<math.h>
#include<set>
#include<map>
#include<iomanip>

//#include<bits/stdc++.h>


using namespace std;


int main() {
	
	string a;
	cin >> a;
	string b = a.substr(0, 5),c=a.substr(6,7),d=a.substr(14,5);
	cout << b << " " << c << " " << d << edndl;

	return 0;

}




Compiler output:
a.cc: In function 'int main()':
a.cc:27:46: error: 'edndl' was not declared in this scope
   27 |         cout << b << " " << c << " " << d << edndl;
      |                                              ^~~~~
Language: C++

#include <stdio.h>

char s1[1024];

int main() {
  scanf("%s", s1);
  for(int i = 0; i < strlen(s1); i++) {
    if(s1[i] == ',') s1[i] = ' ';
  }
  printf("%s\n", s1);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: 'strlen' was not declared in this scope
    7 |   for(int i = 0; i < strlen(s1); i++) {
      |                      ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <stdio.h>
  +++ |+#include <cstring>
    2 |
Language: C++

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

int main(){

string s;
cin>>s;
s[5]="_";
s[13]=" _";
cout<<s<<endl;

    return 0;
}

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

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

int main(){

string s;
cin>>s;
s[5]=" ";
s[13]=" ";
cout<<s<<endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:6: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
    9 | s[5]=" ";
      |      ^~~
      |      |
      |      const char*
a.cc:10:7: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   10 | s[13]=" ";
      |       ^~~
      |       |
      |       const char*
Language: C

#include<stdio.h>
#include<stdlib.h>
int main()
{
 char string[20];
 int i = -1;
 fscanf(stdin,"%19[^\n]",string);
 while(string[++i]!=EOF){
    if(string[i]==','){
         string[i] = ' ';
    }


 
 printf("%s",string);
 return 0;

}


Compiler output:
main.c: In function 'main':
main.c:18:1: error: expected declaration or statement at end of input
   18 | }
      | ^
Language: C++

# -*- utf8 -*-

arg = gets.chomp

# arg = arg.split(" ")

puts arg.gsub(/,/, " ")

Compiler output:
a.cc:1:3: error: invalid preprocessing directive #-
    1 | # -*- utf8 -*-
      |   ^
a.cc:5:3: error: invalid preprocessing directive #arg
    5 | # arg = arg.split(" ")
      |   ^~~
a.cc:3:1: error: 'arg' does not name a type
    3 | arg = gets.chomp
      | ^~~
Language: Java

import java.util.Scanner;

public class TaskA {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		String line = s.nextLine();
		String result = "";
		for(int i = 0; i < line.length(); i ++){
			if(line.charAt(i)==','){
				result += ' ';
			}else{
				result += line.charAt(i);
			}
		}
		System.out.println(result);
	}
}


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

public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		String line = s.nextLine();
		String result = "";
		for(int i = 0; i < line.length(); i ++){
			if(line.charAt(i)==','){
				result += ' ';
			}else{
				result += line.charAt(i);
			}
		}
		System.out.println(result);
	}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: C++

#include<bits/stdc++.h>

#define int long long int
#define rep(a,b,c) for(int a=b;a<c;a++)
#define repm(a,b,c) for(int a=(b-1);a>=c;a--)
#define pb push_back
#define str string
#define sf(a) scanfs("%d",&a)
#define pb push_back
#define mp make_pair
#define Fi first
#define Se second
#define ALL(v) (v).begin(), (v).end()

using namespace std;

const int INF = 1e18 + 9;
const int Mod = 1e9 + 7;
inline int replac(str s){double ans=0;rep(i,0,s.length()){ans+=(s[i]-'0')*pow(10,s.length()-i-1);}return (int)ans;}
inline string numstr(int m){str s="";while(m>0){char c;int a=m/10;if(a>0)a=m%(a*10);else a=m;c=(char)('0'+a);s+=c;m/=10;}str st="";for(int i=s.size()-1;i>=0;i--){st+=s[i];}return st;}
typedef vector<int> vi;
typedef pair<int,int> pii;
typedef vector<pii> vii;
str s;
void ans2();
void ans3();
signed main()
{
    cin >> s;
    rep(i,0,s.size()){
        if(s[i]==',')cout << " ";
        else cout << s[i];
    }
    cout << endl;

 //   str ss;
 //   cin >> ss;
 //   cout << ss.size() << endl;
  //  ans2();
      //  ans3();
    return 0;
}

void ans2(){
    int a,b,c,d;
    cin >> a >> b >> c >> d;
    str a1="";
    str a2="";
    str b1="";
    str b2="";
    rep(i,b,d){
        a1+='U';
        b1+='D';
    }
    rep(j,a,c){
        a2+='R';
        b2+='L';
    }
    str ans=a1;
    ans+=a2;
    ans+=b1;
    ans+=b2;
    ans+='L';
    ans+=a1;
    ans+='U';
    ans+=a2;
    ans+="RDR";
    ans+=b1;
    ans+='D';
    ans+=b2;
    ans+="LU";
    cout << ans << endl;
    cout << ans.size() << endl;
    return ;
}

set<string> an;
void ans3(){
    int n,m;
    cin >> n >> m;
    rep(i,0,n){
        rep(j,0,n){
            if((i+j)>=(m-n)&&(i+j)<=m){
                str ss=to_string(i);
                ss+='#';
                ss+=std::to_string(j);
                ss+='#';
                ss+=std::to_string(m-(i+j));
                an.insert(ss);
            }
        }
    }
    cout << ss.size() << endl;
    return;
}



Compiler output:
a.cc: In function 'void ans3()':
a.cc:93:13: error: 'ss' was not declared in this scope; did you mean 's'?
   93 |     cout << ss.size() << endl;
      |             ^~
      |             s
Language: C++

#include <iostream>
#include <string>
#include <cstdio>
#define ULL unsigned long long
using namespace std;

int main() {
    string str;
    cin.getline(str, EOF);
    
    for (int i=0; i<str.size(); i++){
        if (str[i] != ' ' && str[i] != ',')
            cout << str[i];
        if (str[i] == ',')
            cout << ' ';
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: no matching function for call to 'std::basic_istream<char>::getline(std::string&, int)'
    9 |     cin.getline(str, EOF);
      |     ~~~~~~~~~~~^~~~~~~~~~
In file included from /usr/include/c++/14/iostream:42,
                 from a.cc:1:
/usr/include/c++/14/istream:740:5: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::getline(char_type*, std::streamsize, char_type) [with _CharT = char; _Traits = std::char_traits<char>; char_type = char; std::streamsize = long int]'
  740 |     basic_istream<char>::
      |     ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:740:5: note:   candidate expects 3 arguments, 2 provided
/usr/include/c++/14/istream:520:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::getline(char_type*, std::streamsize) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; char_type = char; std::streamsize = long int]'
  520 |       getline(char_type* __s, streamsize __n)
      |       ^~~~~~~
/usr/include/c++/14/istream:520:26: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::basic_istream<char>::char_type*' {aka 'char*'}
  520 |       getline(char_type* __s, streamsize __n)
      |               ~~~~~~~~~~~^~~
Language: C++

#include <iostream>
#include <string>

int main()
{
	
	string s;

	std::cin >> s ;
	while (true) {

		std::string::size_type pos =  s.find(",");
		if (pos != std::string::npos) {
			s.replace(pos, 1, " ");
		}
		else {
			break;
		}
	}
	std::cout << s << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'string' was not declared in this scope
    7 |         string s;
      |         ^~~~~~
a.cc:7:9: 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:21: error: 's' was not declared in this scope
    9 |         std::cin >> s ;
      |                     ^
a.cc:20:27: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   20 |         std::cout << s << endl;
      |                           ^~~~
      |                           std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>
#include <string>
#include <cstdio>
#define ULL unsigned long long
using namespace std;

int main() {
    string str;
    getline(con, str, EOF);
    
    for (int i=0; i<str.size(); i++){
        if (str[i] != ' ' && str[i] != ',')
            cout << str[i];
        if (str[i] == ',')
            cout << ' ';
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'con' was not declared in this scope
    9 |     getline(con, str, EOF);
      |             ^~~
Language: C

#include <stdio.h>
#include<string.h>


int main(){
	char s[16];
	int k;
	int s;
   int x;
   int y;
   int z;
  int g=0;
  int q;
	scanf("%d%d",&k,&s);
	for(x=0;x<=k;x++){
		
		
		for(y=0;y<=k;y++){
			
			
			for(z=0;z<=k;z++){
				
				if(x+y+z==s){
					
					g++;
				}
				
				
			}
			
			
			
			
			
		}

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

Compiler output:
main.c: In function 'main':
main.c:8:13: error: conflicting types for 's'; have 'int'
    8 |         int s;
      |             ^
main.c:6:14: note: previous declaration of 's' with type 'char[16]'
    6 |         char s[16];
      |              ^
Language: Java

import java.io.*;
public class test1 {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str1=br.readLine();

		String str2=str1.replace(',', ' ');

		System.out.println(str2);

	}

}

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

#include <iostream>
 
using namespace std;
 
int main()
{
    string s;
    cin >> s;
    s[5] = s[13] = ’ ’;
    cout << s << endl;
    return 0;
}

Compiler output:
a.cc:9:20: error: extended character ’ is not valid in an identifier
    9 |     s[5] = s[13] = ’ ’;
      |                    ^
a.cc:9:22: error: extended character ’ is not valid in an identifier
    9 |     s[5] = s[13] = ’ ’;
      |                      ^
a.cc: In function 'int main()':
a.cc:9:20: error: '\U00002019' was not declared in this scope
    9 |     s[5] = s[13] = ’ ’;
      |                    ^
Language: C++

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
int main(void){
char h[20];
scanf("%s",h);
for(i=0;i<strlen(h);i++)
  if(h[i]==',')
    h[i]=' ';
printf("%s\n",h);
return 0;
}


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

#include <iostream>
 
using namespace std;
 
int main()
{
    string s;
    cin >> s;
    s[5] = s[13] = ′ ′;
    cout << s << endl;
    return 0;
}

Compiler output:
a.cc:9:20: error: extended character ′ is not valid in an identifier
    9 |     s[5] = s[13] = ′ ′;
      |                    ^
a.cc:9:22: error: extended character ′ is not valid in an identifier
    9 |     s[5] = s[13] = ′ ′;
      |                      ^
a.cc: In function 'int main()':
a.cc:9:20: error: '\U00002032' was not declared in this scope
    9 |     s[5] = s[13] = ′ ′;
      |                    ^
Language: C++

#include <iostream>

using namespace std;

int main()
{
    string s;
    cin >> s;
    s[5] = s[13] = ‘ ‘;
    cout << s << endl;
    return 0;
}

Compiler output:
a.cc:9:20: error: extended character ‘ is not valid in an identifier
    9 |     s[5] = s[13] = ‘ ‘;
      |                    ^
a.cc:9:22: error: extended character ‘ is not valid in an identifier
    9 |     s[5] = s[13] = ‘ ‘;
      |                      ^
a.cc: In function 'int main()':
a.cc:9:20: error: '\U00002018' was not declared in this scope
    9 |     s[5] = s[13] = ‘ ‘;
      |                    ^
Language: C++

#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
int main(){
    char s[22];
    while(gets(s)){
        int len = strlen(s);
        for(int i = 0;i < len;++i){
            if(s[i] == ',') printf(" ");
            else printf("%c",s[i]);
        }
        printf("\n");
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: 'gets' was not declared in this scope; did you mean 'getw'?
    7 |     while(gets(s)){
      |           ^~~~
      |           getw
Language: C++

#include <iostream>

int main() {
    std::string s;

    std::cin >> s;
    for (int i = 0; i < s.size(); ++i) {
        if (s[i] == ',') std::cout << " ";
        else std::cout << s[i];
    }
    std::cout << std::endl;


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

#include<stdio.h>
int main()
{
    char a;
    for(;;){
    scanf("%c",&a);
    printf("%c",a);
    if(a == ,){
        printf(" ");
    }
    }


    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:13: error: expected expression before ',' token
    8 |     if(a == ,){
      |             ^
Language: C++

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

int main() {
string s;
cin >>s;
s[5] = " ";
s[13] = " ";
s[19] = " ";

cout << s <<endl;

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
    7 | s[5] = " ";
      |        ^~~
      |        |
      |        const char*
a.cc:8:9: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
    8 | s[13] = " ";
      |         ^~~
      |         |
      |         const char*
a.cc:9:9: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
    9 | s[19] = " ";
      |         ^~~
      |         |
      |         const char*
Language: C

#include <stdio.h>

int main()
{
 char c;
 while((c = getchar()) != EOF){
  if(c == ',') c=' ';
  putchar(c);
 }
 retrurn(0);
}

Compiler output:
main.c: In function 'main':
main.c:10:2: error: implicit declaration of function 'retrurn' [-Wimplicit-function-declaration]
   10 |  retrurn(0);
      |  ^~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    string st="";
    char s[100];
    gets(s);
    for(int i=0;s[i];i++){
        if(isalpha(s[i])) st+=s[i];
        else st+=" ";
    }
    cout<<st<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    7 |     gets(s);
      |     ^~~~
      |     getw
Language: Java

import java.util.Scanner;

/**
 * Created by sonetsuyoshi on 2016/07/31.
 */
public class Main {

    static public void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] chs = sc.nextLine().toCharArray();
        chs[5] = ' ';
        chs[13] = ' ';

        for(char ch: chs) System.out.print(ch);
        System.out.println();
    }

    @Test
    public void test() {
        Main m = new Main();
    }
}

Compiler output:
Main.java:18: error: cannot find symbol
    @Test
     ^
  symbol:   class Test
  location: class Main
1 error
Language: C++

main = do
  s <- getLine
  putStrLn $ map (\c -> if c == ',' then ' ' else c) s


Compiler output:
a.cc:3:19: error: stray '\' in program
    3 |   putStrLn $ map (\c -> if c == ',' then ' ' else c) s
      |                   ^
a.cc:1:1: error: 'main' does not name a type
    1 | main = do
      | ^~~~
Language: C++

//==========================================================================
//
//                   Bismillahir-Rahmanir-Rahim
//
// ==========================================================================
#include <bits/stdc++.h>
#define        ll                              long long int
#define        f(x,y,z)                        for(int x=y;x<z;x++)
#define        pii                             pair<int,int>
#define        pll                             pair<ll,ll>
#define        CLR(a)                          memset(a,0,sizeof(a))
#define        SET(a)                          memset(a,-1,sizeof(a))
#define        N                               100010
#define        M                               1000000007
#define        pi                              acos(-1.0)
#define        ff                              first
#define        ss                              second
#define        pb                              push_back
#define        inf                             (int)1e9
#define        eps                              1e-9
using namespace std;
int dx[]={0,0,1,-1,-1,-1,1,1};
int dy[]={1,-1,0,0,-1,1,1,-1};
template < class T> inline T biton(T n,T pos){return n |((T)1<<pos);}
template < class T> inline T bitoff(T n,T pos){return n & ~((T)1<<pos);}
template < class T> inline T ison(T n,T pos){return (bool)(n & ((T)1<<pos));}
template < class T> inline T gcd(T a, T b){while(b){a%=b;swap(a,b);}return a;}
template <typename T> string NumberToString ( T Number ) { ostringstream ss; ss << Number; return ss.str(); }
inline int nxt(){int aaa;scanf("%d",&aaa);return aaa;}
inline ll lxt(){ll aaa;scanf("%lld",&aaa);return aaa;}
inline double dxt(){double aaa;scanf("%lf",&aaa);return aaa;}
template <class T> inline T bigmod(T p,T e,T m){T ret = 1;
for(; e > 0; e >>= 1){
    if(e & 1) ret = (ret * p) % m;p = (p * p) % m;
} return (T)ret;}
#define sayed
#ifdef sayed
     #define debug(args...) {cerr<<"Debug: "; dbg,args; cerr<<endl;}
#else
    #define debug(args...)  // Just strip off all debug tokens
#endif
struct debugger{
    template<typename T> debugger& operator , (const T& v){
        cerr<<v<<" ";
        return *this;
    }
}dbg;
///******************************************START******************************************
vector<string> v;
int main(){
     //freopen("out.txt","w",stdout);
    //ios_base::sync_with_stdio(false);
   //cin.tie(0);
   string s;
   cin>>s;
    s+=',';
    string temp;
   for(int i=0;i<s.length();i++){
        if(s[i]==','){
              v.pb(temp);
              temp.clear();
              continue;
        }
        temp+=s[i];
   }
   for(int i=0;i<v.length();i++){
      if(i) cout<<" ";
      cout<<v[i];
   }
   cout<<endl;

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:66:20: error: 'class std::vector<std::__cxx11::basic_string<char> >' has no member named 'length'
   66 |    for(int i=0;i<v.length();i++){
      |                    ^~~~~~
Language: C++

#define SORT(v) sort(v.begin(), v.end())
#include "iostream"
#include "map"
#include "vector"
#include <stack>
#include "cstdlib"
#include <algorithm>
#include <cstdarg>
#include "ane.cpp"

#define INF (int)1e9
#define NMAX 200
#define MMAX 200
#define MOD 100000
using namespace std;

// コメントアウトするとdb_printf()を実行しない
#define DEBUG
// デバッグ用printf
void db_printf(const char* format, ...){
    #ifndef DEBUG
    return;
    #endif
    va_list arg;
    va_start(arg, format);
    vprintf(format, arg);  // コンソールに出力
    va_end(arg);
}
// n次元配列の初期化。第２引数の型のサイズごとに初期化していく。
template<typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val){
    std::fill( (T*)array, (T*)(array+N), val );
}
typedef pair<int, int> P;

int N,M,dp[NMAX][MMAX] = {};
string s;

static const int di[] = {-1, 0, 1, -1, 1, -1, 0, 1};
static const int dj[] = {-1, -1, -1, 0, 0, 1, 1, 1};

int ans = 0;

void solve(){
    // 解答アルゴリズム
    for (int i = 0; i < s.size(); ++i)
    {
        if (s[i] == ',')
        {
            s[i] = ' ';
        }
    }
}
void debug(){
    // デバッグ用出力
}
void answer(){
    // 解答出力
    cout << s << endl;
}
int main(int argc, char const *argv[])
{
    // 入力の読み込み，番兵法
    ios::sync_with_stdio(false);

    Fill(dp, -1);

    cin >> s;
    solve();
    #ifdef DEBUG
    debug();
    #endif
    answer();

    return 0;
}

Compiler output:
a.cc:9:10: fatal error: ane.cpp: No such file or directory
    9 | #include "ane.cpp"
      |          ^~~~~~~~~
compilation terminated.
Language: C++


#include <iostream>
#include <iomanip>
#include <ios>
#include <sstream>
#include <cstdio>

#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <numeric>
#include <regex>
#include <utility>
#include <random>

#include <cstddef>
#include <cstdint>
#include <cfloat>
#include <limits>

#include <array>
#include <bitset>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <valarray>
#include <vector>
#include <deque>
#include <forward_list>

using namespace std;


int main(){
  ios::sync_with_stdio(false);
  cin.tie(0);

  string s;

  cin >> s;

  replace(ALL(s), ',', ' ');

  cout << s << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:47:11: error: 'ALL' was not declared in this scope
   47 |   replace(ALL(s), ',', ' ');
      |           ^~~
Language: Java

import java.io.*;
class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer(br.readLine(),",");
        System.out.print(st.nextToken()+" "+st.nextToken()+" "+st.nextToken());
    }
    
}


Compiler output:
Main.java:6: error: cannot find symbol
        StringTokenizer st=new StringTokenizer(br.readLine(),",");
        ^
  symbol:   class StringTokenizer
  location: class Main
Main.java:6: error: cannot find symbol
        StringTokenizer st=new StringTokenizer(br.readLine(),",");
                               ^
  symbol:   class StringTokenizer
  location: class Main
2 errors
Language: C++


#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<math.h>
#include<map>

#define rep(i,n,m) for(int i=n;i<(int)(m);i++)

using namespace std;

int main() {



	string str;
	cin >> str;
	rep(i, 0, str.length) {
		if (str[i] == ',') {
			str[i] = ' ' ;
		}
	}

	cout << str << endl;


	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:23: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   19 |         rep(i, 0, str.length) {
      |                       ^
a.cc:9:40: note: in definition of macro 'rep'
    9 | #define rep(i,n,m) for(int i=n;i<(int)(m);i++)
      |                                        ^
Language: Java

import java.util.*;
 
public class Main {
    public static void main(String[] args) {

        Scanner sc  = new Scanner(System.in);

        int cnt = 0;
        String str = "";


        String s1 = sc.next();
        String str = s1.replaceAll(",", " ");

        System.out.print(str);
        System.out.println();
    }

}

Compiler output:
Main.java:13: error: variable str is already defined in method main(String[])
        String str = s1.replaceAll(",", " ");
               ^
1 error
Language: Java

import java.io.*;
class Main {

    static Random random = new Random();

    public static void main(String[] args) throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer(br.readLine(),",");
        System.out.print(st.nextToken()+" "+st.nextToken()+" "+st.nextToken());
    }
    
}


Compiler output:
Main.java:4: error: cannot find symbol
    static Random random = new Random();
           ^
  symbol:   class Random
  location: class Main
Main.java:4: error: cannot find symbol
    static Random random = new Random();
                               ^
  symbol:   class Random
  location: class Main
Main.java:8: error: cannot find symbol
        StringTokenizer st=new StringTokenizer(br.readLine(),",");
        ^
  symbol:   class StringTokenizer
  location: class Main
Main.java:8: error: cannot find symbol
        StringTokenizer st=new StringTokenizer(br.readLine(),",");
                               ^
  symbol:   class StringTokenizer
  location: class Main
4 errors
Language: C++

#include "string/replace_all.hpp"

int main() {
  string s;
  cin >> s;
  replaceAll(s, ",", " ");
  cout << s << endl;
}


Compiler output:
a.cc:1:10: fatal error: string/replace_all.hpp: No such file or directory
    1 | #include "string/replace_all.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

package abc051;

import java.util.*;
class A{
	static Scanner s = new Scanner(System.in);
	public static void main(String[] args) {
		System.out.println(s.next().replaceAll(",", " "));
	}
}

Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package abc051;
      | ^~~~~~~
a.cc:3:1: error: 'import' does not name a type
    3 | import java.util.*;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:16: error: 'Scanner' does not name a type
    5 |         static Scanner s = new Scanner(System.in);
      |                ^~~~~~~
a.cc:6:15: error: expected ':' before 'static'
    6 |         public static void main(String[] args) {
      |               ^~~~~~~
      |               :
a.cc:6:33: error: 'String' has not been declared
    6 |         public static void main(String[] args) {
      |                                 ^~~~~~
a.cc:6:42: error: expected ',' or '...' before 'args'
    6 |         public static void main(String[] args) {
      |                                          ^~~~
a.cc:9:2: error: expected ';' after class definition
    9 | }
      |  ^
      |  ;
a.cc: In static member function 'static void A::main(int*)':
a.cc:7:17: error: 'System' was not declared in this scope
    7 |                 System.out.println(s.next().replaceAll(",", " "));
      |                 ^~~~~~
a.cc:7:36: error: 's' was not declared in this scope
    7 |                 System.out.println(s.next().replaceAll(",", " "));
      |                                    ^
Language: C++

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

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


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