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

#include <bits/stdc++.h>
using namespace std;
 int main () {
   int R;
   int G;
   int x;  
   
   cin >> R;
   cin >> G;
   cin >> x;
   
   cout << (R+x)/2.0=G << endl;
}   

Compiler output:
a.cc: In function 'int main()':
a.cc:12:24: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   12 |    cout << (R+x)/2.0=G << endl;
      |                      ~~^~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 int main () {
   int R;
   int G
   int x  
   
   cin >> R;
   cin >> G;
   cin >> x;
   
   cout << (R+x)/2.0=G << endl;
}   

Compiler output:
a.cc: In function 'int main()':
a.cc:6:4: error: expected initializer before 'int'
    6 |    int x
      |    ^~~
a.cc:9:11: error: 'G' was not declared in this scope
    9 |    cin >> G;
      |           ^
a.cc:10:11: error: 'x' was not declared in this scope
   10 |    cin >> x;
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
　int main () {
   int R;
   int G;
   
   cin >> R;
   cin >> G;
   
   cout << (R+G)*0.5 << endl;
}   

Compiler output:
a.cc:3:1: error: extended character 　 is not valid in an identifier
    3 | 　int main () {
      | ^
a.cc:3:1: error: '\U00003000int' does not name a type
    3 | 　int main () {
      | ^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
　int main () {
   int R;
   int G;
   
   cin >> R;
   cin >> G;
   
   cout << (R+G)/2.0 << endl;
}   

Compiler output:
a.cc:3:1: error: extended character 　 is not valid in an identifier
    3 | 　int main () {
      | ^
a.cc:3:1: error: '\U00003000int' does not name a type
    3 | 　int main () {
      | ^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
　int main () {
   int R;
   int G;
   
   cin >> R;
   cin >> G;
   
   cout << (R+G)/2 <<endl;
}   

Compiler output:
a.cc:3:1: error: extended character 　 is not valid in an identifier
    3 | 　int main () {
      | ^
a.cc:3:1: error: '\U00003000int' does not name a type
    3 | 　int main () {
      | ^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
　int main () {
   int R;
   int G;
   
   cin >> R;
   cin >> G;
   
   cout << (R+G)/2.0 <<endl;
}   

Compiler output:
a.cc:3:1: error: extended character 　 is not valid in an identifier
    3 | 　int main () {
      | ^
a.cc:3:1: error: '\U00003000int' does not name a type
    3 | 　int main () {
      | ^~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:11: error: expected unqualified-id before ';' token
    4 |   int a,b,;
      |           ^
Language: C++

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

int main() {
  int R,G,;
  double x;
  
  cin>>R,G;
  x=2*G-R;
  cout<<x<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:11: error: expected unqualified-id before ';' token
    5 |   int R,G,;
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int A, B;
  cin >> A >> B;
  cout << 2B - A << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: unable to find numeric literal operator 'operator""B'
    7 |   cout << 2B - A << endl;
      |           ^~
Language: C++

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

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


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

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

int main() {
  double a b;
  cin >> a >> b;
  cout << ( b - a ) + b << endl;
}


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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int r,g,;
  float x;
  cin >> r >> g;
  x = 2*g-r;
  cout << x << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:11: error: expected unqualified-id before ';' token
    5 |   int r,g,;
      |           ^
Language: C++

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

int main(){
  int a,b;
  cin >> a >> b;
  cout << (2b-a) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: unable to find numeric literal operator 'operator""b'
    7 |   cout << (2b-a) << endl;
      |            ^~
Language: C++

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

int main(){
  int a,b;
  cin >> a;
  cin >> b;
  cout << (2b-a) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: unable to find numeric literal operator 'operator""b'
    8 |   cout << (2b-a) << endl;
      |            ^~
Language: C++

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

int main(){
  int a,b;
  cin >> a >> b;
  cout << (2b-a) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: unable to find numeric literal operator 'operator""b'
    7 |   cout << (2b-a) << endl;
      |            ^~
Language: C++

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

int main(){
  double R, G;
  cin >> R >> G;
  cout << 2G-R <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: unable to find numeric literal operator 'operator""G'
    7 |   cout << 2G-R <<endl;
      |           ^~
Language: C++

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

int main() {
  // ここにプログラムを追記
  double R,G;
  cin >> R >> G;
  cout << 2G - R <<endl;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: unable to find numeric literal operator 'operator""G'
    8 |   cout << 2G - R <<endl;
      |           ^~
Language: C++

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

int main() {
  // ここにプログラムを追記
  int R,G;
  cin >> R >> G;
  cout << 2G - R <<endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: unable to find numeric literal operator 'operator""G'
    8 |   cout << 2G - R <<endl;
      |           ^~
Language: C++

int name(){
  int R,G;
  cin >> R >> G;
  cout << R+G <<endl;
}

Compiler output:
a.cc: In function 'int name()':
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin >> R >> G;
      |   ^~~
a.cc:4:3: error: 'cout' was not declared in this scope
    4 |   cout << R+G <<endl;
      |   ^~~~
a.cc:4:17: error: 'endl' was not declared in this scope
    4 |   cout << R+G <<endl;
      |                 ^~~~
a.cc:5:1: warning: no return statement in function returning non-void [-Wreturn-type]
    5 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std
  
int main(){
  int R, G;
  cin >> R >> G;
  cout << 2 * G - R << endl;
  
}

Compiler output:
a.cc:2:20: error: expected ';' before 'int'
    2 | using namespace std
      |                    ^
      |                    ;
    3 | 
    4 | int main(){
      | ~~~
Language: C++

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

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

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

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

int main(){
  int a,g;
    cin >> a>>g;
  cout << 2*g - a << endl;
}

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

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

int main(){
  int a,g;
    cin >> a>>g;
  cout << 2*g-a << endl;
}

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

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

int main() {
  int << R << G;
  cin >> R >> G;
  cout << 2 * G -R << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: expected unqualified-id before '<<' token
    5 |   int << R << G;
      |       ^~
a.cc:6:10: error: 'R' was not declared in this scope
    6 |   cin >> R >> G;
      |          ^
a.cc:6:15: error: 'G' was not declared in this scope
    6 |   cin >> R >> G;
      |               ^
Language: C++

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

int main() {
  int << R, << G;
  cin >> R, >> G;
  cout << 2 * G -R << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: expected unqualified-id before '<<' token
    5 |   int << R, << G;
      |       ^~
a.cc:6:10: error: 'R' was not declared in this scope
    6 |   cin >> R, >> G;
      |          ^
a.cc:6:13: error: expected primary-expression before '>>' token
    6 |   cin >> R, >> G;
      |             ^~
a.cc:6:16: error: 'G' was not declared in this scope
    6 |   cin >> R, >> G;
      |                ^
Language: C++

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

int main() {
  int << R, >>G;
  cin >> R, >> G;
  cout << 2 * G -R << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: expected unqualified-id before '<<' token
    5 |   int << R, >>G;
      |       ^~
a.cc:6:10: error: 'R' was not declared in this scope
    6 |   cin >> R, >> G;
      |          ^
a.cc:6:13: error: expected primary-expression before '>>' token
    6 |   cin >> R, >> G;
      |             ^~
a.cc:6:16: error: 'G' was not declared in this scope
    6 |   cin >> R, >> G;
      |                ^
Language: C++

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

int main() {
  cin >> R, G;
  int << R, G;
  cout << 2 * G -R << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: 'R' was not declared in this scope
    5 |   cin >> R, G;
      |          ^
a.cc:5:13: error: 'G' was not declared in this scope
    5 |   cin >> R, G;
      |             ^
a.cc:6:7: error: expected unqualified-id before '<<' token
    6 |   int << R, G;
      |       ^~
Language: C++

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

int main() {
  int << R, G;
  cin >> R, G;
  cout << 2 * G -R << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: expected unqualified-id before '<<' token
    5 |   int << R, G;
      |       ^~
a.cc:6:10: error: 'R' was not declared in this scope
    6 |   cin >> R, G;
      |          ^
a.cc:6:13: error: 'G' was not declared in this scope
    6 |   cin >> R, G;
      |             ^
Language: C++

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

int main() {
  int << X
  int << R, G;
  cin >> R, G;
  cout << 2 * G -R << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: expected unqualified-id before '<<' token
    5 |   int << X
      |       ^~
a.cc:7:10: error: 'R' was not declared in this scope
    7 |   cin >> R, G;
      |          ^
a.cc:7:13: error: 'G' was not declared in this scope
    7 |   cin >> R, G;
      |             ^
Language: C++

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

int main() {
  double << R, G;
  cin >> R, G;
  cout << 2 * G -R << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: expected unqualified-id before '<<' token
    5 |   double << R, G;
      |          ^~
a.cc:6:10: error: 'R' was not declared in this scope
    6 |   cin >> R, G;
      |          ^
a.cc:6:13: error: 'G' was not declared in this scope
    6 |   cin >> R, G;
      |             ^
Language: C++

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

double main() {
  double << R, G;
  cin >> R, G;
  cout << 2 * G -R << endl;
}

Compiler output:
a.cc:4:1: error: '::main' must return 'int'
    4 | double main() {
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:5:10: error: expected unqualified-id before '<<' token
    5 |   double << R, G;
      |          ^~
a.cc:6:10: error: 'R' was not declared in this scope
    6 |   cin >> R, G;
      |          ^
a.cc:6:13: error: 'G' was not declared in this scope
    6 |   cin >> R, G;
      |             ^
Language: C++

#include <bits/stdc++.h>
main(){int R,G;std::cin>>R>>G;cout<<(G-R)*2+R<<std::endl;}

Compiler output:
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){int R,G;std::cin>>R>>G;cout<<(G-R)*2+R<<std::endl;}
      | ^~~~
a.cc: In function 'int main()':
a.cc:2:31: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    2 | main(){int R,G;std::cin>>R>>G;cout<<(G-R)*2+R<<std::endl;}
      |                               ^~~~
      |                               std::cout
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C

Subtract R(current score) from G(the score he wants to hit). Add this value on G.

Compiler output:
main.c:1:1: error: unknown type name 'Subtract'
    1 | Subtract R(current score) from G(the score he wants to hit). Add this value on G.
      | ^~~~~~~~
main.c:1:12: error: unknown type name 'current'
    1 | Subtract R(current score) from G(the score he wants to hit). Add this value on G.
      |            ^~~~~~~
Language: C

#include <stdio.h>

int main () {

    int R, G, T;
     scanf ("%d", &R);
     scanf ("%d", &G);
    
     T = (2 * G) - R;
     
	   	if (R <= 0 or G >= 4500) {
		   printf ("Invalid rating value");}
			else {
			printf ("%d", T);
			}
			return 0;
			}

Compiler output:
main.c: In function 'main':
main.c:11:27: error: expected ')' before 'or'
   11 |                 if (R <= 0 or G >= 4500) {
      |                    ~      ^~~
      |                           )
Language: C

#include <stdio.h>
int main() {
int a,b,c;
printf("input your current rating: ");
scanf("%d", &a);
printf("input your desired rating: ");
scanf("%d", &c);
printf("Your next performance must be: '%d'", 2*c-a );
return0;
}

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

#include <studio.h>
int main() {
int a,b,c;
printf("Input your current rating: ");
scanf("%d", &a);
printf("Input your desired rating: ");
scanf("%d", &c);
printf("Your next performance must be: '%d'", 2*c-a );
return 0;
}

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

#include<stdio.h>

int main()
{
    int r, g, average;
    scanf("%d",&r);
    scanf("%d",&g);
    average=(g*2)-r;
    printf("%d", average)
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:26: error: expected ';' before 'return'
    9 |     printf("%d", average)
      |                          ^
      |                          ;
   10 |     return 0;
      |     ~~~~~~
Language: C

#include<stdio.h>

int main(void)
{
  int r,g;
  scanf("%d %d",&r,&g);
  
  printf("%d",2g-r);
  
  return 0;
}
  

Compiler output:
main.c: In function 'main':
main.c:8:15: error: invalid suffix "g" on integer constant
    8 |   printf("%d",2g-r);
      |               ^~
Language: C++

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

int main() {
int R,G
  cin>>R>>G;
  cout<<2*G-R<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'cin'
    6 |   cin>>R>>G;
      |   ^~~
a.cc:7:11: error: 'G' was not declared in this scope
    7 |   cout<<2*G-R<<endl;
      |           ^
Language: C++

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

int main() {
int R,G
  cin>>R>>G;
  cout<<2G-R<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'cin'
    6 |   cin>>R>>G;
      |   ^~~
a.cc:7:9: error: unable to find numeric literal operator 'operator""G'
    7 |   cout<<2G-R<<endl;
      |         ^~
Language: C++

#include <bits/stdc++.h>
using namespace std
  
int main() {
  int R, G;
  cin >> R, G;
  cout << 2 * G - R << endl;
}

Compiler output:
a.cc:2:20: error: expected ';' before 'int'
    2 | using namespace std
      |                    ^
      |                    ;
    3 | 
    4 | int main() {
      | ~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main () {
  int R,G;
  cin >> R >> G;
  cout << 2 * G - R << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:7:29: error: expected '}' at end of input
    7 |   cout << 2 * G - R << endl;
      |                             ^
a.cc:4:13: note: to match this '{'
    4 | int main () {
      |             ^
Language: C++

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

int main() {
  int a,b;
  cin >> a >> b;
  cout << b*2-a

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: expected ';' at end of input
    7 |   cout << b*2-a
      |                ^
      |                ;
a.cc:7:16: error: expected '}' at end of input
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include<stdc++.h>

using namespace std;


void pln()
{
	cout << endl;
	return;
}

void print(int x)
{
	cout << x << endl;
	return;
}

int ri() {
	int x;
	cin >> x;
	return x;
}

int main(void)
{
	int R = ri();
	int G = ri();

	int ans = 2*G - R;

	print(ans);
}



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

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

int main() {
  int = R;
  double = G;
  cin >> R >> G;
  cout << G*2-R << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: expected unqualified-id before '=' token
    5 |   int = R;
      |       ^
a.cc:6:10: error: expected unqualified-id before '=' token
    6 |   double = G;
      |          ^
a.cc:7:10: error: 'R' was not declared in this scope
    7 |   cin >> R >> G;
      |          ^
a.cc:7:15: error: 'G' was not declared in this scope
    7 |   cin >> R >> G;
      |               ^
Language: C++

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

int main() {
  int a,b;

  cin >> r>>g;

  cout <<(r+g)/2<< endl;
}



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

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

int main(){
  cin>>a>>b;
  cout<<a+b/2<<endl;
 

}

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

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

int main() {
  int R, G
  cin >> R >> G;
  cout << G * 2 - R << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'cin'
    6 |   cin >> R >> G;
      |   ^~~
a.cc:7:11: error: 'G' was not declared in this scope
    7 |   cout << G * 2 - R << endl;
      |           ^
Language: C++

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

int main() {
  int R, G
  cin >> R >> G;
  cout << 2G - R << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'cin'
    6 |   cin >> R >> G;
      |   ^~~
a.cc:7:11: error: unable to find numeric literal operator 'operator""G'
    7 |   cout << 2G - R << endl;
      |           ^~
Language: C

#include<stdio.h>
int main( void )
{
    int r, g;
    scanf("%d", &r);
    scanf("%d", &g);
    printf("%d\n", 2g-r);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:20: error: invalid suffix "g" on integer constant
    7 |     printf("%d\n", 2g-r);
      |                    ^~
Language: C

#include<stdio.h>

int main( void )
{
    int r, g;
    scanf("%d", &r);
    scanf("%d", &g);

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

Compiler output:
main.c: In function 'main':
main.c:9:20: error: invalid suffix "g" on integer constant
    9 |     printf("%d\n", 2g-r);
      |                    ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  double R, G;
  cin >> R >> G;
  double a;
  a = 2*G - R
  cout << a << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: expected ';' before 'cout'
    8 |   a = 2*G - R
      |              ^
      |              ;
    9 |   cout << a << endl;
      |   ~~~~
Language: C++

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

int main () {
  double g,double r;
  cin >> r >> g;
  cout << g + g - r << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: expected unqualified-id before 'double'
    5 |   double g,double r;
      |            ^~~~~~
a.cc:6:10: error: 'r' was not declared in this scope
    6 |   cin >> r >> g;
      |          ^
Language: C++

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

int main () {
  double g,double r;
  cin >> r >> g;
  cout << g + g - r << endl;
}


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

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

int main () {
  int g,int r;
  cin >> r >> g;
  cout << g + g - r << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: expected unqualified-id before 'int'
    5 |   int g,int r;
      |         ^~~
a.cc:6:10: error: 'r' was not declared in this scope
    6 |   cin >> r >> g;
      |          ^
Language: C++

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

int main () {
  int g,int r;
  cin >> r >> g;
  cout << g + g - r << endl;
}

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

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

int main() {
  int R, G;
  cin >> R >> G;
  cout  << R + (R + G) * 2 endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:27: error: expected ';' before 'endl'
    7 |   cout  << R + (R + G) * 2 endl;
      |                           ^~~~~
      |                           ;
Language: C++

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

int main(){
  int r,g;
  0<=r,g<=4500
  cin >> r >> g;
  cout << g*2-r <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: expected ';' before 'cin'
    6 |   0<=r,g<=4500
      |               ^
      |               ;
    7 |   cin >> r >> g;
      |   ~~~
Language: C++

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

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


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

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

int main() {
 int R,G;
  cin>>R>>G;
  cout<<2G-R<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: unable to find numeric literal operator 'operator""G'
    7 |   cout<<2G-R<<endl;
      |         ^~
Language: C++

#include <iostream>
using namespace std:

int main(){
int r,g,x;
cin>>r;
cin>>g;
x=(g*2)-r;
cout<<x;
}

Compiler output:
a.cc:2:20: error: expected ';' before ':' token
    2 | using namespace std:
      |                    ^
      |                    ;
a.cc:2:20: error: expected unqualified-id before ':' token
Language: C++

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

typedef long long ll;
typedef pair<int, int> P;

const int INF = (1 << 30) - 1;
const ll INF64 = ((ll)1 << 62) - 1;
const ll MOD = 1e9 + 7;
const double PI = 3.1415926535897932384626433832795;

int main()
{
	int n, k, a = 1;
	cin >> n >> k;
	for (int i = 0; i < k; ++i)
	{
		if(a * 2 > a + k){
			a += k;
		}else{
			a +* 2;
		}
	}
	cout << a << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:28: error: invalid type argument of unary '*' (have 'int')
   22 |                         a +* 2;
      |                            ^~~
Language: C++

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

int main() {
  int R, G;
  cin >> R, G;
  cout << 2G - R << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: unable to find numeric literal operator 'operator""G'
    7 |   cout << 2G - R << endl;
      |           ^~
Language: C++

import java.util.Scanner;

class Main {
    
    public static void main(String[] areg) {
        Scanner sc = new Scanner(System.in);
		int R = sc.	nextInt();
		int G = sc.	nextInt();
		sc.close();
        
        System.out.println(G * 2 - R);
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:11: error: expected ':' before 'static'
    5 |     public static void main(String[] areg) {
      |           ^~~~~~~
      |           :
a.cc:5:29: error: 'String' has not been declared
    5 |     public static void main(String[] areg) {
      |                             ^~~~~~
a.cc:5:38: error: expected ',' or '...' before 'areg'
    5 |     public static void main(String[] areg) {
      |                                      ^~~~
a.cc:13:2: error: expected ';' after class definition
   13 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:6:9: error: 'Scanner' was not declared in this scope
    6 |         Scanner sc = new Scanner(System.in);
      |         ^~~~~~~
a.cc:7:25: error: 'sc' was not declared in this scope
    7 |                 int R = sc.     nextInt();
      |                         ^~
a.cc:11:9: error: 'System' was not declared in this scope
   11 |         System.out.println(G * 2 - R);
      |         ^~~~~~
Language: C++

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

int main() {
  double R, G, x;
  cin >> R >> G;
  x = 2G - R;
  cout << x << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: unable to find numeric literal operator 'operator""G'
    7 |   x = 2G - R;
      |       ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
  int R,G;
	cin>>R;
    cin>>G;
  cout<<2*G-R<<endl;
    

Compiler output:
a.cc:4:3: error: expected initializer before 'int'
    4 |   int R,G;
      |   ^~~
a.cc:5:9: error: 'cin' does not name a type
    5 |         cin>>R;
      |         ^~~
a.cc:6:5: error: 'cin' does not name a type
    6 |     cin>>G;
      |     ^~~
a.cc:7:3: error: 'cout' does not name a type
    7 |   cout<<2*G-R<<endl;
      |   ^~~~
Language: C++

#include <bits/stdc++>
using namespace std;
int main()
  int R,G;
	cin>>R;
    cin>>G;
  cout<<2*G-R<<endl;
    

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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  double r,g;
 
  cin >> r >> g;

  cout << 2g-r << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: unable to find numeric literal operator 'operator""g'
    9 |   cout << 2g-r << endl;
      |           ^~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main() {
  int r, c;
  cin >> r >> c;
  cout << g + (g - r) << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: 'g' was not declared in this scope
    8 |   cout << g + (g - r) << endl;
      |           ^
Language: C

#include <stdio.h>

int main() {
  int R, G;
  
  sacnf("%d %d", &R, &G);
  printf("%d\n", 2*G - R);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:3: error: implicit declaration of function 'sacnf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    6 |   sacnf("%d %d", &R, &G);
      |   ^~~~~
      |   scanf
Language: C++

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

int main() {
  int R, G
   cin >> R >> endl;
   cin >> G >> endl;
  
  cout << 2 * G / R << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:4: error: expected initializer before 'cin'
    6 |    cin >> R >> endl;
      |    ^~~
a.cc:7:11: error: 'G' was not declared in this scope
    7 |    cin >> G >> endl;
      |           ^
Language: C++

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

int main(){
  int R, G
   cin >> R >> endl;
   cin >> G >> endl;
  
  cout << 2 * G / R << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:4: error: expected initializer before 'cin'
    6 |    cin >> R >> endl;
      |    ^~~
a.cc:7:11: error: 'G' was not declared in this scope
    7 |    cin >> G >> endl;
      |           ^
Language: C++

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

int main() {
  int R, G
   cin >> R >> endl;
   cin >> G >> endl;
  
  cout << 2 * G / R << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:4: error: expected initializer before 'cin'
    6 |    cin >> R >> endl;
      |    ^~~
a.cc:7:11: error: 'G' was not declared in this scope
    7 |    cin >> G >> endl;
      |           ^
Language: C++

#include <iosteam>
using namespace std;
     
int main() {
      
     int R,G;
      R=0;
      G=0;
      cin>>R>>endl;
      cin>>G>>endl;
      
        cout<<2*G/R<<endl;
      
    }

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

#include <iosteam>
using namespace std;
     
int main() {
      
     int R, G;
      R = 0;
      G = 0;
      cin >> R >> endl;
      cin >> G >> endl;
      
        cout << 2 * G / R << endl;
      
    }

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

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

int main() {
  int R, G;
  R = 0
  G = 0
  cin >> R >> endl >> G >> endl;
  
    cout << 2 * G / R << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: expected ';' before 'G'
    6 |   R = 0
      |        ^
      |        ;
    7 |   G = 0
      |   ~
Language: C++

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

int main() {
  int R, G, T;
  T = 2 * G / R
    
    cout << T << endl;
  
}
    
    
  

Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: expected ';' before 'cout'
    6 |   T = 2 * G / R
      |                ^
      |                ;
    7 | 
    8 |     cout << T << endl;
      |     ~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int R,G;
  double y;
  cin>>R,G;
  y=2G-R;
  cout<<y<<endl;
}
    
  

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: unable to find numeric literal operator 'operator""G'
    7 |   y=2G-R;
      |     ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
double main(){
  double R,G,y;
  cin>>R,G;
  y=2G-R;
  cout<<y<<endl;
}
    
  

Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | double main(){
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:6:5: error: unable to find numeric literal operator 'operator""G'
    6 |   y=2G-R;
      |     ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  double R,G,y;
  cin>>R,G;
  y=R-2G;
  cout<<y<<endl;
}
    
  

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: unable to find numeric literal operator 'operator""G'
    6 |   y=R-2G;
      |       ^~
Language: C++

using namespace std;
 
int main() {
  int R,G;
  double a; 
  cin >> R >> G;
  a == (G * 2) - R;    
  cout << a;
}

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

#include <bits/stdc++.h>

#define o(output) cout << output << endl

using namespace std;

string s;
int a,b,c,d;
char A,B;

int main(){
  cin >>a>>b;
  o(2b-a);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: unable to find numeric literal operator 'operator""b'
   13 |   o(2b-a);
      |     ^~
a.cc:3:27: note: in definition of macro 'o'
    3 | #define o(output) cout << output << endl
      |                           ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int r, g;
  cin >> r >> g;
  cout << 2g - r << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: unable to find numeric literal operator 'operator""g'
    7 |   cout << 2g - r << endl;
      |           ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int r, g;
  cin r >> g;
  cout << 2g - r << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'r'
    6 |   cin r >> g;
      |      ^~
      |      ;
a.cc:7:11: error: unable to find numeric literal operator 'operator""g'
    7 |   cout << 2g - r << endl;
      |           ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int nowRate, obj, nextRate;
  cin nowRate >> obj;
  cout << 2 * nextRate - nowRate << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'nowRate'
    6 |   cin nowRate >> obj;
      |      ^~~~~~~~
      |      ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int r, obj, g;
  cin r >> obj;
  cout << 2 * g - r << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'r'
    6 |   cin r >> obj;
      |      ^~
      |      ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int r, obj, g;
  cin r >> obj;
  cout << 2 * g -r << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'r'
    6 |   cin r >> obj;
      |      ^~
      |      ;
Language: C++

#include <iostream>

int main(){
  int r, g;
  cin >> r >> g;
  cout << 2*g-r;
  return 0;
}

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

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

int main() {
  int R;
  cin >> R;
  int G;
  cin >> G;
  
  cout << 2G - R << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: unable to find numeric literal operator 'operator""G'
   10 |   cout << 2G - R << endl;
      |           ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
int R,G;
cin>>R>>G;
cout<<2G-R<<endl;






}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: unable to find numeric literal operator 'operator""G'
    6 | cout<<2G-R<<endl;
      |       ^~
Language: C++

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

int main () {
  int R, G,;
  cin >> R >> G;
  
  cout << 2 * G - R << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: expected unqualified-id before ';' token
    5 |   int R, G,;
      |            ^
Language: C++

`#include <iostream>

using namespace std;

int main() {
    int R, G;
    cin >> R >> G;
    cout << G * 2 - R << endl;
}

Compiler output:
a.cc:1:1: error: stray '`' in program
    1 | `#include <iostream>
      | ^
a.cc:1:2: error: stray '#' in program
    1 | `#include <iostream>
      |  ^
a.cc:1:3: error: 'include' does not name a type
    1 | `#include <iostream>
      |   ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin >> R >> G;
      |     ^~~
a.cc:8:5: error: 'cout' was not declared in this scope
    8 |     cout << G * 2 - R << endl;
      |     ^~~~
a.cc:8:26: error: 'endl' was not declared in this scope
    8 |     cout << G * 2 - R << endl;
      |                          ^~~~
Language: C

#include<stdio.h>

int main(void){
  int R,G;
  scanf("%d%d",&M,&G);
  printf("%d\n",G*2-R);
}

Compiler output:
main.c: In function 'main':
main.c:5:17: error: 'M' undeclared (first use in this function)
    5 |   scanf("%d%d",&M,&G);
      |                 ^
main.c:5:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main() {
  int r, g;
  cin >> g >> r ;
  cout << 2g-r << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: unable to find numeric literal operator 'operator""g'
    7 |   cout << 2g-r << endl;
      |           ^~
Language: C++

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

int main() {
  int r, g;
  cin >> g >> r ;
  cout <<2g-r << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: unable to find numeric literal operator 'operator""g'
    7 |   cout <<2g-r << endl;
      |          ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  double r,g;
  cin >> r >> g;
  cout << (r + g) % 2 <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    7 |   cout << (r + g) % 2 <<endl;
      |           ~~~~~~~ ^ ~
      |              |      |
      |              double int
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  // ここに追記
  double r,g;
  cin >> r >> g;
  cout << (r + g) % 2 <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    8 |   cout << (r + g) % 2 <<endl;
      |           ~~~~~~~ ^ ~
      |              |      |
      |              double int
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  // ここに追記
  double r,g;
  cin >> r >> g;
  cout << (r + g) % 2 <<;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    8 |   cout << (r + g) % 2 <<;
      |           ~~~~~~~ ^ ~
      |              |      |
      |              double int
a.cc:8:25: error: expected primary-expression before ';' token
    8 |   cout << (r + g) % 2 <<;
      |                         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int R,G ;
  cin >> R >> G
  cout << G - R + G << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:16: error: expected ';' before 'cout'
    5 |   cin >> R >> G
      |                ^
      |                ;
    6 |   cout << G - R + G << endl;
      |   ~~~~
Language: C++

#include <stdio.h>
int main(){
   int R,G;
   scanf("%d%d"&R, &G);
   int nextscore = (G-R)*2+R;
     printf("%d\n",nextscore);
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:16: error: invalid operands of types 'const char [5]' and 'int' to binary 'operator&'
    4 |    scanf("%d%d"&R, &G);
      |          ~~~~~~^~
      |          |      |
      |          |      int
      |          const char [5]
Language: C++

#include<iostream>
#include<string>
int main() {
	int a, b;
 
 
	std::cin >> a >> b;
	if ((a*b!=0)) {
      if(a==b){
        std::cout << a << std::endl;
      }else{
		std::cout <<2*b-a << std::endl;
	}
    }
	else {
		if (a - b >= 0) {
			std::cout << -a << std::endl;
		}else {
			std::cout << -b << std::endl;
		}
		}
 
		}

Compiler output:
a.cc:5:1: error: extended character   is not valid in an identifier
    5 |  
      | ^
a.cc:6:1: error: extended character   is not valid in an identifier
    6 |  
      | ^
a.cc:22:1: error: extended character   is not valid in an identifier
   22 |  
      | ^
a.cc: In function 'int main()':
a.cc:5:1: error: '\U000000a0' was not declared in this scope
    5 |  
      | ^
a.cc:22:2: error: expected ';' before '}' token
   22 |  
      |  ^
      |  ;
   23 |                 }
      |                 ~
Language: C++

#include<iostream>
#include<string>
int main() {
	int a, b;


	std::cin >> a >> b;
	if ((a*b !=0)) {
		std::cout <<2*b-a << std::endl;
	}
	else {
		if (a - b > 0) {
			std::cout << -a << std::endl;
		}else {
			if(b-a>0){
			std::cout << -b << std::endl;
			}
			else {
				std::cout << 0 << std::endl;
			}
		}

		}


}​

Compiler output:
a.cc:26:2: error: '\U0000200b' does not name a type
   26 | }​
      |
Language: C++

#include<iostream>
#include<string>
int main() {
	int a, b;


	std::cin >> a >> b;
	if ((a*b !=0)) {
		std::cout <<2*b-a << std::endl;
	}
	else {
		if (a - b > 0) {
			std::cout << -a << std::endl;
		}else {
			if(b-a>0){
			std::cout << -b << std::endl;
			}
			else {
				std::cout << 0 << std::endl;
			}
		}

		}




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

#include <iostream>
using namespace std;

int main(){
	int R,G;
	cin >> R >> G;
	cout << 2G-R;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: unable to find numeric literal operator 'operator""G'
    7 |         cout << 2G-R;
      |                 ^~
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		// 標準入力
		Scanner sc = new Scanner(System.in);

		String line1 = sc.nextLine();
		String line2 = sc.nextLine();
		int result = 0;

		int R =Integer.parseInt(line1);
		int G = Integer.parseInt(line2);

		result = G*2 -R;

		System.out.println(result);
	}

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

puts STDIN.read.lines.map(&:to_i).zip([-1, 2]).map{ |a,b| a*b}.inject(:+)


Compiler output:
a.cc:1:1: error: 'puts' does not name a type
    1 | puts STDIN.read.lines.map(&:to_i).zip([-1, 2]).map{ |a,b| a*b}.inject(:+)
      | ^~~~
a.cc:1:63: error: expected unqualified-id before '.' token
    1 | puts STDIN.read.lines.map(&:to_i).zip([-1, 2]).map{ |a,b| a*b}.inject(:+)
      |                                                               ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int a,b;
  cin>>a>>b;
  cout<<2*b-a<<endl;
  return 0
}

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

#include<stdio.h>

int main(){
  int a;
  scanf("%d %d",&a,&g);

  printf("%.3lf",2.0*g-a);

  return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:21: error: 'g' was not declared in this scope
    5 |   scanf("%d %d",&a,&g);
      |                     ^
Language: C++

#include<stdio.h>

int main(){
  int a,g;
  scanf("%d",&a);
  int g;
  scanf("%d\n",&g);

  printf("%.3lf",2*(g-a));

  return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: redeclaration of 'int g'
    6 |   int g;
      |       ^
a.cc:4:9: note: 'int g' previously declared here
    4 |   int a,g;
      |         ^
Language: C++

#include<stdio.h>

int main(){
  int a;
  scanf("%d %d",&a,&g);
 

  printf("%.3lf",0.5*(a+g));

  return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:21: error: 'g' was not declared in this scope
    5 |   scanf("%d %d",&a,&g);
      |                     ^
Language: C

#include<stdio.h>

int main(void)
{
   int R,G;
   scanf("%d%d",&R,&G);
   printf("%d\n",2R-G);
   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:4: warning: large fixed-point constant implicitly truncated to fixed-point type [-Woverflow]
    7 |    printf("%d\n",2R-G);
      |    ^~~~~~
main.c:7:18: error: fixed-point types not supported for this target
    7 |    printf("%d\n",2R-G);
      |                  ^~
Language: C++

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

int main() {
	// your code goes here
	int R,G;
	cin >> R >> G;
	cout << 2*C-R<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: 'C' was not declared in this scope
    9 |         cout << 2*C-R<<endl;
      |                   ^
Language: C++

#include <iostream>
int main() {
int R, G;
std::cin >> R >> G;
std::endl << 2*G - R << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:11: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator<<'
    5 | std::endl << 2*G - R << std::endl;
      | ~~~~~~~~~~^~~~~~~~~~
Language: C

#include<stdio.h>
int main()
{
float r,g;
scanf("%f",&r);
scanf("%f",&g);
float a=2*g-r;
printf("%f ",a)
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:16: error: expected ';' before 'return'
    8 | printf("%f ",a)
      |                ^
      |                ;
    9 | return 0;
      | ~~~~~~
Language: C++

#include<bits/stdc++.h>

int main(){
  int r,g;
  cin >> r >> g;
  cout << g*2 - r << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin >> r >> g;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |   cout << g*2 - r << 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:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |   cout << g*2 - r << endl;
      |                      ^~~~
      |                      std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~