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

#include<bits/stdc++.h>
using namespace std;
int main() {
int N,i;
cin>>N;
int x[N+1];
string u[N];
for(i=0;i<N;i++){
  cin>>x[i+1]>>u[i];
}
for(i=0;i<N;i++){
  if(u[N]=="JPY") x[i]=x[i];
    else x[i]=x[i]*380000;
}
for(i=0;i<N;i++){
  N=i
 x[N+1]=x[N];
}
cout<<x[N];
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:6: error: expected ';' before 'x'
   16 |   N=i
      |      ^
      |      ;
   17 |  x[N+1]=x[N];
      |  ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
int N,i;
cin>>N;
int x[N+1];
string u[N];
for(i=0;i<N;i++){
  cin>>x[i+1]>>u[i]
}
for(i=0;i<N;i++){
  if(u[N]=="JPY") x[i]=x[i];
    else x[i]=x[i]*380000;
}
for(i=0;i<N;i++){
  n=i
 x[N+1]=x[N];
}
cout<<x[N]
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: expected ';' before '}' token
    9 |   cin>>x[i+1]>>u[i]
      |                    ^
      |                    ;
   10 | }
      | ~                   
a.cc:16:3: error: 'n' was not declared in this scope
   16 |   n=i
      |   ^
a.cc:19:11: error: expected ';' before '}' token
   19 | cout<<x[N]
      |           ^
      |           ;
   20 | }
      | ~
Language: C++

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

int main(){
  int N;
  int sum =0;
  double a;
  string b;
  double c = 380000;
  for(int i=0;i<N;++i){
    cin >> a >> b;
    if(b==BTC){
     a = a * c;
    }
    sum += a;
  }
  cout << sum <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: 'BTC' was not declared in this scope
   12 |     if(b==BTC){
      |           ^~~
Language: C++

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

int main(){
  int N;
  int sum =0;
  double a;
  string b;
  double c = 380000.0;
  for(int i=0;i<N;++i){
    cin >> a >> b;
    if(b= 'BTC'){
     a = a * c;
    }
    sum += a;
  }
  cout << sum <<endl;
}

Compiler output:
a.cc:12:11: warning: multi-character character constant [-Wmultichar]
   12 |     if(b= 'BTC'){
      |           ^~~~~
a.cc: In function 'int main()':
a.cc:12:11: warning: overflow in conversion from 'int' to 'char' changes value from '4346947' to '67' [-Woverflow]
a.cc:12:9: error: could not convert 'b.std::__cxx11::basic_string<char>::operator=(67)' from 'std::__cxx11::basic_string<char>' to 'bool'
   12 |     if(b= 'BTC'){
      |        ~^~~~~~~
      |         |
      |         std::__cxx11::basic_string<char>
Language: C++

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

int main(){
  int N;
  int sum =0;
  double a;
  string b;
  double c = 380000.0;
  for(int i=0;i<N;++i){
    cin >> a >> b;
    if(b=BTC){
     a = a * c;
    }
    sum += a;
  }
  cout << sum <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: 'BTC' was not declared in this scope
   12 |     if(b=BTC){
      |          ^~~
Language: C++

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

int main(){
  int N;
  int sum =0;
  double a;
  string b;
  double c = 380000.0;
  for(int i=0;i<N;++i){
    cin >> a >> b;
    if(b="BTC"){
     a = a * c;
    }
    sum += a;
  }
  cout << sum <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: could not convert 'b.std::__cxx11::basic_string<char>::operator=(((const char*)"BTC"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   12 |     if(b="BTC"){
      |        ~^~~~~~
      |         |
      |         std::__cxx11::basic_string<char>
Language: C++

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

int main(){
  int N;
  int sum =0;
  double a;
  string b;
  double c = 380000.0;
  for(int i=0;i<N;++i){
    cin >> a >> b;
    if(b="BTC"){
     a = a * b;
    }
    sum += a;
  }
  cout << sum <<endl;
}

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

#include <iostream>
#include <iomanip>
// std::cout << std::setprecision(2) << 3.141; // "3.1"
#include <algorithm>
#include <vector>
#include <string>
#include <cmath>
#include <map>

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> plglg;
typedef pair<double, ll> pdlg;
typedef tuple<int, int, int> tiii;
typedef tuple<ll, ll, ll> tlglglg;
typedef tuple<double, double, double> tddd;

static const int giga = pow(10,9);
// double pi = 3.141592653589793238463;

int main(void){
  int n;
  cin >> n;
  double ans = 0;


  for(int i = 0; i < n; i++){
    double x;
    string str;
    cin >> x >> str;

    if(str == "JPY"){
      ans += x;
    } else {
      ans += x*380000.0
    }
  }


  cout << setprecision(6) << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:24: error: expected ';' before '}' token
   37 |       ans += x*380000.0
      |                        ^
      |                        ;
   38 |     }
      |     ~
Language: C++

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

int main() {
  int N;
  cin >> N;
  double sum=0;
  rep(i,N){
    double x;
    string u;
    cin >> x >> u;
    if(u=="BTC"){
      sum+=x*BTC;
    }else{
      sum+=x;
    }
  }
  printf("%.5f\n",sum);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: 'i' was not declared in this scope
    9 |   rep(i,N){
      |       ^
a.cc:9:3: error: 'rep' was not declared in this scope
    9 |   rep(i,N){
      |   ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  double x,ans = 0.0;
  string s;
  int n;
  cin >> n;
  for(int i=0;i<n;i++){
    cin >> x >> s;
    if(s == "JPY") ans+=x;
    else ans += x*380000.0;
  }
  cout << fixed << setprecition(10) << ans << endl;
}


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

#include<bits/stdc++.h>
using namespace std;
int main(){
  double x,ans = 0.0;
  string s;
  int n;
  cin >> n;
  for(int i=0;i<n;i++){
    cin >> x >> s;
    if(s == "JPY") ans+=x;
    else ans += x*38000;
  }
  cout << fixed << setprecition(10) << ans << endl;
}


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

#include<iostream>
#include<string>
using namespace std;
int main(){
  double x,ans = 0.0;
  string s;
  int n;
  cin >> n;
  for(int i=0;i<n;i++){
    cin >> x >> s;
    if(s == "JPY") ans+=x;
    else ans += x*38000;
  }
  cout << fixed << setprecition(10) << ans << endl;
}


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

#include<iostream>
#include<string>
using namespace std;
int main(){
  double x,ans = 0.0;
  string s;
  int n;
  cin >> n;
  for(int i=0;i<n;i++){
    cin >> x >> s;
    if(s == "JPY") ans+=x;
    else ans += x*38000;
  }
  cout << fixed << setpresection(10) << ans << endl;
}

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

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

#define REP(i, s, n) for (int i = s; i < n; ++i)
#define rep(i, n) REP(i, 0, n)
#define SORT(c) sort((c).begin(), (c).end())
#define SORT_INV(c) sort((c).begin(), (c).end(), greater<int>())

#define IINF INT_MAX
#define LLINF LLONG_MAX
#define DEBUG false
#define LL long long
#define Dev 1000000007

// sort(a.begin(), a.end(), std::greater<int>());
using namespace std;

int main()
{

    int n;
    cin >> n;
    double ans = 0;
    rep(i, n)
    {
        double x;
        string u;
        cin >> x >> u;
        if (u == "JPY")
            and += x;
        else
        {
            ans += x * 380000;
        }
    }
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:17: error: expected identifier before '+=' token
   30 |             and += x;
      |                 ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
int N,i;
cin>>N;
int x[N+1];
string u[N];
for(i=0,i<N,i++){
  cin>>x[i+1]>>u[i]
}
for(i=0,i<N,i++){
  if(u[N]=="JPY") x[i]=x[i];
    else x[i]=x[i]*380000;
}
for(i=0,i<N,i++){
  n=i
 x[N+1]=x[N];
}
cout<<x[N]
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: expected ';' before ')' token
    8 | for(i=0,i<N,i++){
      |                ^
      |                ;
a.cc:11:1: error: expected primary-expression before 'for'
   11 | for(i=0,i<N,i++){
      | ^~~
a.cc:10:2: error: expected ';' before 'for'
   10 | }
      |  ^
      |  ;
   11 | for(i=0,i<N,i++){
      | ~~~
a.cc:11:1: error: expected primary-expression before 'for'
   11 | for(i=0,i<N,i++){
      | ^~~
a.cc:10:2: error: expected ')' before 'for'
   10 | }
      |  ^
      |  )
   11 | for(i=0,i<N,i++){
      | ~~~
a.cc:8:4: note: to match this '('
    8 | for(i=0,i<N,i++){
      |    ^
a.cc:11:16: error: expected ';' before ')' token
   11 | for(i=0,i<N,i++){
      |                ^
      |                ;
a.cc:15:1: error: expected primary-expression before 'for'
   15 | for(i=0,i<N,i++){
      | ^~~
a.cc:14:2: error: expected ';' before 'for'
   14 | }
      |  ^
      |  ;
   15 | for(i=0,i<N,i++){
      | ~~~
a.cc:15:1: error: expected primary-expression before 'for'
   15 | for(i=0,i<N,i++){
      | ^~~
a.cc:14:2: error: expected ')' before 'for'
   14 | }
      |  ^
      |  )
   15 | for(i=0,i<N,i++){
      | ~~~
a.cc:11:4: note: to match this '('
   11 | for(i=0,i<N,i++){
      |    ^
a.cc:15:16: error: expected ';' before ')' token
   15 | for(i=0,i<N,i++){
      |                ^
      |                ;
a.cc:19:11: error: expected ';' before '}' token
   19 | cout<<x[N]
      |           ^
      |           ;
   20 | }
      | ~          
a.cc:20:1: error: expected primary-expression before '}' token
   20 | }
      | ^
a.cc:19:11: error: expected ')' before '}' token
   19 | cout<<x[N]
      |           ^
      |           )
   20 | }
      | ~          
a.cc:15:4: note: to match this '('
   15 | for(i=0,i<N,i++){
      |    ^
a.cc:20:1: error: expected primary-expression before '}' token
   20 | }
      | ^
Language: C++

#include<bits/stdc++.h>
int main() {
int N,i;
std::cin>>N
int x[N+1];
std::string u[N];
for(i=0,i<N,i++) std::cin>>x[i+1]>>u[i]
for(i=0,i<N,i++){
  if(u[N]=="JPY") x[i]=x[i];
    else x[i]=x[i]*380000;
}
for(i=0,i<N,i++){
  x[N]+=i
  n=i
 x[N+1]=x[N];
}
cout<<x[N]
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:12: error: expected ';' before 'int'
    4 | std::cin>>N
      |            ^
      |            ;
    5 | int x[N+1];
      | ~~~         
a.cc:7:16: error: expected ';' before ')' token
    7 | for(i=0,i<N,i++) std::cin>>x[i+1]>>u[i]
      |                ^
      |                ;
a.cc:12:1: error: expected primary-expression before 'for'
   12 | for(i=0,i<N,i++){
      | ^~~
a.cc:11:2: error: expected ';' before 'for'
   11 | }
      |  ^
      |  ;
   12 | for(i=0,i<N,i++){
      | ~~~
a.cc:12:1: error: expected primary-expression before 'for'
   12 | for(i=0,i<N,i++){
      | ^~~
a.cc:11:2: error: expected ')' before 'for'
   11 | }
      |  ^
      |  )
   12 | for(i=0,i<N,i++){
      | ~~~
a.cc:7:4: note: to match this '('
    7 | for(i=0,i<N,i++) std::cin>>x[i+1]>>u[i]
      |    ^
a.cc:12:16: error: expected ';' before ')' token
   12 | for(i=0,i<N,i++){
      |                ^
      |                ;
a.cc:17:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 | cout<<x[N]
      | ^~~~
      | 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
      |                  ^~~~
a.cc:17:7: error: 'x' was not declared in this scope
   17 | cout<<x[N]
      |       ^
a.cc:17:11: error: expected ';' before '}' token
   17 | cout<<x[N]
      |           ^
      |           ;
   18 | }
      | ~          
a.cc:18:1: error: expected primary-expression before '}' token
   18 | }
      | ^
a.cc:17:11: error: expected ')' before '}' token
   17 | cout<<x[N]
      |           ^
      |           )
   18 | }
      | ~          
a.cc:12:4: note: to match this '('
   12 | for(i=0,i<N,i++){
      |    ^
a.cc:18:1: error: expected primary-expression before '}' token
   18 | }
      | ^
Language: C++

#include<bits/stdc++.h>
int main() {
int N,i;
cin>>N
int x[N+1];
string u[N];
for(i=0,i<N,i++) cin>>x[i+1]>>u[i]
for(i=0,i<N,i++){
  if(u[N]=="JPY") x[i]=x[i];
    else x[i]=x[i]*380000;
}
for(i=0,i<N,i++){
  x[N]+=i
  n=i
 x[N+1]=x[N];
}
cout<<x[N]
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 | cin>>N
      | ^~~
      | 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:1: error: 'string' was not declared in this scope
    6 | string u[N];
      | ^~~~~~
a.cc:6:1: 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:
/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:7:16: error: expected ';' before ')' token
    7 | for(i=0,i<N,i++) cin>>x[i+1]>>u[i]
      |                ^
      |                ;
a.cc:12:1: error: expected primary-expression before 'for'
   12 | for(i=0,i<N,i++){
      | ^~~
a.cc:11:2: error: expected ';' before 'for'
   11 | }
      |  ^
      |  ;
   12 | for(i=0,i<N,i++){
      | ~~~
a.cc:12:1: error: expected primary-expression before 'for'
   12 | for(i=0,i<N,i++){
      | ^~~
a.cc:11:2: error: expected ')' before 'for'
   11 | }
      |  ^
      |  )
   12 | for(i=0,i<N,i++){
      | ~~~
a.cc:7:4: note: to match this '('
    7 | for(i=0,i<N,i++) cin>>x[i+1]>>u[i]
      |    ^
a.cc:12:16: error: expected ';' before ')' token
   12 | for(i=0,i<N,i++){
      |                ^
      |                ;
a.cc:17:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 | cout<<x[N]
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:17:7: error: 'x' was not declared in this scope
   17 | cout<<x[N]
      |       ^
a.cc:17:11: error: expected ';' before '}' token
   17 | cout<<x[N]
      |           ^
      |           ;
   18 | }
      | ~          
a.cc:18:1: error: expected primary-expression before '}' token
   18 | }
      | ^
a.cc:17:11: error: expected ')' before '}' token
   17 | cout<<x[N]
      |           ^
      |           )
   18 | }
      | ~          
a.cc:12:4: note: to match this '('
   12 | for(i=0,i<N,i++){
      |    ^
a.cc:18:1: error: expected primary-expression before '}' token
   18 | }
      | ^
Language: C++

#include<bits/stdc++.h>
int main() {
int N,i;
cin<<N
int x[N+1];
string u[N];
for(i=0,i<N,i++) cin<<x[N],u[N]
for(i=0,i<N,i++){
  if(u[N]=="JPY") x[i]=x[i];
    else x[i]=x[i]*380000;
}
for(i=0,i<N,i++){
  n=i
 x[N+1]=x[N];
}
cout>>x[N]
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 | cin<<N
      | ^~~
      | 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:1: error: 'string' was not declared in this scope
    6 | string u[N];
      | ^~~~~~
a.cc:6:1: 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:
/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:7:16: error: expected ';' before ')' token
    7 | for(i=0,i<N,i++) cin<<x[N],u[N]
      |                ^
      |                ;
a.cc:12:1: error: expected primary-expression before 'for'
   12 | for(i=0,i<N,i++){
      | ^~~
a.cc:11:2: error: expected ';' before 'for'
   11 | }
      |  ^
      |  ;
   12 | for(i=0,i<N,i++){
      | ~~~
a.cc:12:1: error: expected primary-expression before 'for'
   12 | for(i=0,i<N,i++){
      | ^~~
a.cc:11:2: error: expected ')' before 'for'
   11 | }
      |  ^
      |  )
   12 | for(i=0,i<N,i++){
      | ~~~
a.cc:7:4: note: to match this '('
    7 | for(i=0,i<N,i++) cin<<x[N],u[N]
      |    ^
a.cc:12:16: error: expected ';' before ')' token
   12 | for(i=0,i<N,i++){
      |                ^
      |                ;
a.cc:16:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 | cout>>x[N]
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:16:7: error: 'x' was not declared in this scope
   16 | cout>>x[N]
      |       ^
a.cc:16:11: error: expected ';' before '}' token
   16 | cout>>x[N]
      |           ^
      |           ;
   17 | }
      | ~          
a.cc:17:1: error: expected primary-expression before '}' token
   17 | }
      | ^
a.cc:16:11: error: expected ')' before '}' token
   16 | cout>>x[N]
      |           ^
      |           )
   17 | }
      | ~          
a.cc:12:4: note: to match this '('
   12 | for(i=0,i<N,i++){
      |    ^
a.cc:17:1: error: expected primary-expression before '}' token
   17 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int n;
double x,sum;
string u;
int main(){
  cin>>n;
  for(i=0;i<n;i++){
    cin>>x>>u;
    if(u=="BTC")sum+=x*380000.0;
    else sum+=x;
  }
  printf("%f\n",sum);
}


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

def main():
    N = int(input())
    ans = 0
    for _ in range(N):
        x, u = input().split()
        x = float(x)
        if u == "JPY":
            ans += x
        else:
            ans += x * 380000.0
    print(ans)

if __name__ == '__main__':
    main()


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

#include<bits/stdc++.h>

#define rep(i, a, n)  for(int i=a; i<n; i++)
#define per(i, a, n)  for(int i=n-1; i>=a; i--)
#define fill0(n)  setfill('0') << right << setw(n)
#define all(x)  (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define MAX 1000000001;
using namespace std;
typedef long long ll;

int n;
long long float x;
string u;

int main(){
  std::cin >> n;
  ll res = 0;
  rep(i,1,n+1){
    std::cin >> x >> u;
    if(u == "JPY")res += x;
    else res += x*380000.0;
  }
  std::cout << res << '\n';
}


Compiler output:
a.cc:13:6: error: 'long long' specified with 'float'
   13 | long long float x;
      |      ^~~~
Language: C++

#include<bits/stdc++.h>

#define rep(i, a, n)  for(int i=a; i<n; i++)
#define per(i, a, n)  for(int i=n-1; i>=a; i--)
#define fill0(n)  setfill('0') << right << setw(n)
#define all(x)  (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define MAX 1000000001;
using namespace std;
typedef long long ll;

int n;
long long float x;
string s;

int main(){
  std::cin >> n;
  ll res = 0;
  rep(i,1,n+1){
    std::cin >> x >> u;
    if(u == "JPY")res += x;
    else res += x*380000.0;
  }
  std::cout << res << '\n';
}


Compiler output:
a.cc:13:6: error: 'long long' specified with 'float'
   13 | long long float x;
      |      ^~~~
a.cc: In function 'int main()':
a.cc:20:22: error: 'u' was not declared in this scope
   20 |     std::cin >> x >> u;
      |                      ^
Language: C++

#include <bits/stdc++.h>
using.namespace std;
int main (){
int (N,x(k),k);
char (u(k));
  cin<<(N,x(k),u(k))
    k=1→N
    if (u(k)="JPY") cout>>x(k);
        else cout>>380000*x(k);
    for (int k=1;k<N+1;k++){
      n=k
        x(n)+=x(n)
   printf x(n)
}

Compiler output:
a.cc:7:7: error: extended character → is not valid in an identifier
    7 |     k=1→N
      |       ^
a.cc:2:6: error: expected nested-name-specifier before '.' token
    2 | using.namespace std;
      |      ^
a.cc: In function 'int main()':
a.cc:4:6: error: 'N' was not declared in this scope
    4 | int (N,x(k),k);
      |      ^
a.cc:4:10: error: 'k' was not declared in this scope
    4 | int (N,x(k),k);
      |          ^
a.cc:4:8: error: 'x' was not declared in this scope
    4 | int (N,x(k),k);
      |        ^
a.cc:4:14: error: expression list treated as compound expression in functional cast [-fpermissive]
    4 | int (N,x(k),k);
      |              ^
a.cc:5:7: error: 'u' was not declared in this scope
    5 | char (u(k));
      |       ^
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin<<(N,x(k),u(k))
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:9: error: 'else' without a previous 'if'
    9 |         else cout>>380000*x(k);
      |         ^~~~
a.cc:9:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |         else cout>>380000*x(k);
      |              ^~~~
      |              std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:11:7: error: 'n' was not declared in this scope
   11 |       n=k
      |       ^
a.cc:14:2: error: expected '}' at end of input
   14 | }
      |  ^
a.cc:3:12: note: to match this '{'
    3 | int main (){
      |            ^
Language: C++

#include <iostream> 
#include <iomanip> 
#include <vector> 
#include <algorithm> 
#include <numeric> 
#include <functional> 
#include <cmath> 
#include <queue> 
#include <stack> 

#define Ford(i,a,b) for (int i=(a);i<(b);i++) 
#define For(i,n) Ford(i,0,n) 
typedef long long ll; 

using namespace std;

int main(){
  int N;
  doubble Money=0.0;
  cin>>N;
  double x[N];
  string u[N];
  for(int i=0;i<N;i++){
    cin>>x[i]>>u[i];
    if(u[i]=="JPY"){
      Money+=x[i];
    }
    else{
      Money+=x[i]*(380000.0);
    }
  }
  cout<<fixed<<setprecision(11)<<Money<<endl;
  return 0;
}





Compiler output:
a.cc: In function 'int main()':
a.cc:19:3: error: 'doubble' was not declared in this scope; did you mean 'double'?
   19 |   doubble Money=0.0;
      |   ^~~~~~~
      |   double
a.cc:26:7: error: 'Money' was not declared in this scope
   26 |       Money+=x[i];
      |       ^~~~~
a.cc:29:7: error: 'Money' was not declared in this scope
   29 |       Money+=x[i]*(380000.0);
      |       ^~~~~
a.cc:32:34: error: 'Money' was not declared in this scope
   32 |   cout<<fixed<<setprecision(11)<<Money<<endl;
      |                                  ^~~~~
Language: C++

int main()
{
	int N;
	cin >> N;
	vd x(N);
	vs u(N);
	for (int i = 0; i < N; i++) {
		cin >> x[i] >> u[i];
	}
 
	double ans = 0;
	for (int i = 0; i < N; i++) {
		if (u[i] == "JPY")
			ans += x[i];
		else
			ans += x[i] * 380000.0;
	}
 
	cout << ans << endl;
 
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         cin >> N;
      |         ^~~
a.cc:5:9: error: 'vd' was not declared in this scope
    5 |         vd x(N);
      |         ^~
a.cc:6:9: error: 'vs' was not declared in this scope
    6 |         vs u(N);
      |         ^~
a.cc:8:24: error: 'x' was not declared in this scope
    8 |                 cin >> x[i] >> u[i];
      |                        ^
a.cc:8:32: error: 'u' was not declared in this scope
    8 |                 cin >> x[i] >> u[i];
      |                                ^
a.cc:13:21: error: 'u' was not declared in this scope
   13 |                 if (u[i] == "JPY")
      |                     ^
a.cc:14:32: error: 'x' was not declared in this scope
   14 |                         ans += x[i];
      |                                ^
a.cc:16:32: error: 'x' was not declared in this scope
   16 |                         ans += x[i] * 380000.0;
      |                                ^
a.cc:19:9: error: 'cout' was not declared in this scope
   19 |         cout << ans << endl;
      |         ^~~~
a.cc:19:24: error: 'endl' was not declared in this scope
   19 |         cout << ans << endl;
      |                        ^~~~
Language: C++

#include <iostream> 
#include <iomanip> 
#include <vector> 
#include <algorithm> 
#include <numeric> 
#include <functional> 
#include <cmath> 
#include <queue> 
#include <stack> 

#define Ford(i,a,b) for (int i=(a);i<(b);i++) 
#define For(i,n) Ford(i,0,n) 
typedef long long ll; 

using namespace std;

int main(){
  int N;
  ll Money=0.0;
  cin>>N;
  int x[N];
  string u[N];
  for(int i=0;i<N;i++){
    cin>>x[i]>>u[i];
    if(u[i]=="JPY"){
      Money+=x[i];
    }
    else{
      Money+=u[i]*380000.0;
    }
  }
  cout<<Money<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:18: error: no match for 'operator*' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'double')
   29 |       Money+=u[i]*380000.0;
      |              ~~~~^~~~~~~~~
      |                 | |
      |                 | double
      |                 std::string {aka std::__cxx11::basic_string<char>}
Language: C++

#include <iostream>

#include "utils.hpp"

int main(int argc,char *argv[]){
	uint64_t N;
	double sum_of_BTC = 0.;
	uint64_t sum_of_JPY = 0u;
	std::cin >> N;
	for(uint64_t i=0u ; i<N ; ++i){
		std::string s,t;
		std::cin >> s >> t;
		if(t.compare("JPY") == 0){
			sum_of_JPY += str2<uint64_t>(s);
		} else {
			sum_of_BTC += str2<double>(s);
		}
	}
	std::cout << sum_of_JPY + 3.8e5 * sum_of_BTC;
	return 0;
}



Compiler output:
a.cc:3:10: fatal error: utils.hpp: No such file or directory
    3 | #include "utils.hpp"
      |          ^~~~~~~~~~~
compilation terminated.
Language: C

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

int main(void){
  int N;
  double sum = 0;
  double x;
  char u[4];
  
  scanf("%d", &N);
  
  for(int cnt_n = 0; cnt_n < N; cnt_n++){
   scanf("%lf %s", &x, u);
    if(strcmp(u, "JPY") == 0)){
      sum += x;
    }else if(strcmp(u, "BTC") == 0)){
      sum += (x*380000);
    }
  }
  
  printf("%f\n", sum);
  
 return 0; 
}


Compiler output:
main.c: In function 'main':
main.c:14:30: error: expected statement before ')' token
   14 |     if(strcmp(u, "JPY") == 0)){
      |                              ^
main.c:16:6: error: 'else' without a previous 'if'
   16 |     }else if(strcmp(u, "BTC") == 0)){
      |      ^~~~
main.c:16:36: error: expected statement before ')' token
   16 |     }else if(strcmp(u, "BTC") == 0)){
      |                                    ^
Language: C

#include <bits/stdc++.h>

#define vec(v) vector<int>(v)
#define be(v) (v).begin(), (v).end()
#define pb(q) push_back(q)
#define mapci(mp) map<char*,int>(mp)
#define mapcc(mp) map<char*,char*>(mp)
typedef long long ll;
using namespace std;

int main() {
   double N,x,ans=0;
   string u;
   cin>>N;
   for(int i=0;i<N;i++){
       cin>>x>>u;
       if(u=="BTC"){
           x*=380000;
       }
       ans+=x;
   }
   cout<<ans<<endl;
    return 0;
}


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

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n;
	double s,ans=0;
	char c[5];
	scanf("%d",&n);
	for(int i=1;i<=n;i++)
	{
		scanf("%lf %s",&s,c);
		if(c[0]=='J')
			ans+=s;
		else
			ans+=s*380000
	}
	printf("%.5lf",ans);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:38: error: expected ';' before '}' token
   15 |                         ans+=s*380000
      |                                      ^
      |                                      ;
   16 |         }
      |         ~
Language: C++

#include<iostream>
#include<stdio.h>
using namespace std;

int main(){
        int n;
        cin >> n;
        float a[10];
        string b[10];
        float ans;
        float sum = 0;

        for(int i = 1; i <= n; i++){
                cin >> a[i-1];
                cin >> b[i-1];
                if(b[i-1] == "BTC"){
                        ans = a[i-1] * 380000;
                }else{
                        ans = a[i-1];
                }
                sum = sum + ans;
        }
        cout << sum << endl;

        return 0;
}




~                                                                                                    
~                     

Compiler output:
a.cc:32:1: error: expected class-name before '~' token
   32 | ~
      | ^
Language: C

#include <stdio.h>
int main(){
  int n;
  scanf("%d",&n);
  double x[n];
  char u[n][3];
  for (int i=0;i<n,i++){
    scanf("%lf %s",&x[i],&u[i][3]);
  }
  double sum=0;
  for (int i=0;i<n,i++){
    if (u[i]=="JPY"){
      sum+=x[i];
    }
    if (u[i]=="BTC"){
      sum+=x[i]*380000.0;
    }
  }
  printf("%lf\n",sum);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:23: error: expected ';' before ')' token
    7 |   for (int i=0;i<n,i++){
      |                       ^
      |                       ;
main.c:11:23: error: expected ';' before ')' token
   11 |   for (int i=0;i<n,i++){
      |                       ^
      |                       ;
Language: C

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

int Main(void) {
	int N, i,check;
	double num, total = 0;
	char str[4];

	check = scanf("%d", &N);

	for (i = 0; i < N; i++) {
		check = scanf("%lf%s", &num, str);

		if (strcmp(str, "JPY")==0) {
			total += num;
		}
		else {
			total += num * 380000;
		}
	}
	printf("%lf\n", total);
		return 0;
	}

Compiler output:
/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 <stdio.h>

int Main(void) {
	int N, i,check;
	double num, total = 0;
	char str[4];

	check = scanf("%d", &N);

	for (i = 0; i < N; i++) {
		check = scanf("%lf%s", &num, str);

		if (strcmp(str, "JPY")==0) {
			total += num;
		}
		else {
			total += num * 380000;
		}
	}
	printf("%lf\n", total);
		return 0;
	}

Compiler output:
main.c: In function 'Main':
main.c:13:21: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
   13 |                 if (strcmp(str, "JPY")==0) {
      |                     ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strcmp'
    1 | #include <stdio.h>
  +++ |+#include <string.h>
    2 |
Language: C

#include <stdio.h>

int Main(void) {
	int N;
	int i;
	double num, total = 0;
	char str[4];

	scanf("%d", &N);

	for (i = 0; i < N; i++) {
		scanf("%lf%s", &num, str);

		if (strcmp(str, "JPY")==0) {
			total += num;
		}
		else {
			total += num * 380000;
		}
	}
	printf("%lf\n", total);
		return 0;
	}

Compiler output:
main.c: In function 'Main':
main.c:14:21: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
   14 |                 if (strcmp(str, "JPY")==0) {
      |                     ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strcmp'
    1 | #include <stdio.h>
  +++ |+#include <string.h>
    2 |
Language: C++

#include<iostream>
using namespace std;

int main(){
    int N;
    double x;
    char u[3];
    double sum=0;
    cin>>N;
    for(int m=1;m<=N;m++){
       cin>>x>>u[3];
       if(u[3]="BTC"){
         x=x*380000;
       }
       sum+=x;
    }
    int ans=sum;
    cout<<ans;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   12 |        if(u[3]="BTC"){
      |                ^~~~~
      |                |
      |                const char*
Language: C

#include <stdio.h>

int main(void) {
	int N;
	int i;
	double num, total = 0;
	char str[4];

	scanf_s("%d", &N);

	for (i = 0; i < N; i++) {
		scanf("%lf%s", &num, str);

		if (strcmp(str, "JPY")==0) {
			total += num;
		}
		else {
			total += num * 380000;
		}
	}
	printf("%lf\n", total);
		return 0;
	}

Compiler output:
main.c: In function 'main':
main.c:9:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    9 |         scanf_s("%d", &N);
      |         ^~~~~~~
      |         scanf
main.c:14:21: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
   14 |                 if (strcmp(str, "JPY")==0) {
      |                     ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strcmp'
    1 | #include <stdio.h>
  +++ |+#include <string.h>
    2 |
Language: C

#include<stdio.h>
#include<string.h>
int main()
{
  int sinseki=0;
  float chip=0;
  char *late_s;
  char *late_c="BTC";
  float sum=0;
  scanf("%d",&sinseki);
  for(int i=0;i<sinseki;i++)
  {
    scanf("%f",chip);
    for(int j=0;j=1;j++)
    {
      scanf("%s",late);
    }
    if(strcmp(late_s,late_c)==0)
    {
      chip*=380000.0;
    }
    sum+=chip;
  }
  printf("%f",sum);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:18: error: 'late' undeclared (first use in this function); did you mean 'late_c'?
   16 |       scanf("%s",late);
      |                  ^~~~
      |                  late_c
main.c:16:18: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(void){
  int N,i,;
  double x[10]={0},count=0;
  char u[10][4];
  for(i=0;i<N;i++){
    scanf("%f %s",x[i],u[i]);
  }
  for(i=0;i<N;i++){
    if(u[i]="JPY"){
      count+=x[i];
    }else if(u[i]="BTC"){
      count+=x[i]*380000;
    }else{
      continue;
    }
  }
  printf("%f\n",count);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:11: error: expected identifier or '(' before ';' token
    3 |   int N,i,;
      |           ^
main.c:10:12: error: assignment to expression with array type
   10 |     if(u[i]="JPY"){
      |            ^
main.c:12:18: error: assignment to expression with array type
   12 |     }else if(u[i]="BTC"){
      |                  ^
Language: C

#include<stdio.h>
int main(void){
  int N,i;
  double x[10]={0},count=0;
  char u[10][4]="";
  for(i=0;i<N;i++){
    scanf("%f %s",x[i],u[i]);
  }
  for(i=0;i<N;i++){
    if(u[i]=="Y"){
      count+=x[i];
    }else if(u[i]=="BTC"){
      count+=x[i]*380000;
    }else{
      continue;
    }
  }
  printf("%f\n",count);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:17: error: invalid initializer
    5 |   char u[10][4]="";
      |                 ^~
Language: C

#include<stdio.h>
int main(void){
  int N,i,;
  double x[10]={0},count=0;
  char u[10][4]="";
  for(i=0;i<N;i++){
    scanf("%f %s",x[i],u[i]);
  }
  for(i=0;i<N;i++){
    if(u[i]="JPY"){
      count+=x[i];
    }else if(u[i]="BTC"){
      count+=x[i]*380000;
    }else{
      continue;
    }
  }
  printf("%f\n",count);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:11: error: expected identifier or '(' before ';' token
    3 |   int N,i,;
      |           ^
main.c:5:17: error: invalid initializer
    5 |   char u[10][4]="";
      |                 ^~
main.c:10:12: error: assignment to expression with array type
   10 |     if(u[i]="JPY"){
      |            ^
main.c:12:18: error: assignment to expression with array type
   12 |     }else if(u[i]="BTC"){
      |                  ^
Language: C

#include<stdio.h>
int main(void){
  int n,i;
  double a[],b[],sum=0;
  char c[];
  scanf("%d",&n);
  for(i=1;i<=n;i++){
    scanf("%d %s",&a[i],&c[i]);
    if(b[i]==BTC){
      b[i]=380000*a[i];
    }else{
      b[i]=a[i];
    }
    sum=sum+b[i];
  }
  printf("%lf",sum);
}

Compiler output:
main.c: In function 'main':
main.c:4:10: error: array size missing in 'a'
    4 |   double a[],b[],sum=0;
      |          ^
main.c:4:14: error: array size missing in 'b'
    4 |   double a[],b[],sum=0;
      |              ^
main.c:5:8: error: array size missing in 'c'
    5 |   char c[];
      |        ^
main.c:9:14: error: 'BTC' undeclared (first use in this function)
    9 |     if(b[i]==BTC){
      |              ^~~
main.c:9:14: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <iostream>
#include <iomanip>
#include <typeinfo>
using namespace std;

int main()
{
	int N;
	cin >> N;

	double x[10];
	char u[10];

	for (int i = 0; i < N; i++) {
		cin >> x[i] >> u[i];
		cin.ignore(2);
	}

	for (int i = 0; i < N; i++) {
		cout << x[i] << u[i];
		
	}
	
	for (int i = 0; i < N; i < ++) {
		if (u[i] == 'B')u[i] *= 380000.0;
	}
	double answer = 0;
	for (int i = 0; i < N; i++) {
		answer += x[i];
	}

	cout << fixed << setprecision(8) << answer << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:38: error: expected primary-expression before ')' token
   24 |         for (int i = 0; i < N; i < ++) {
      |                                      ^
Language: C

#include <stdio.h>

int main(void){
 
  int n;
  int i;
  scanf("%d",&n);
  
  char m[n][3];
  double a[n];
  double tot = 0;
  
  for(i = 0; i < n; i++){
    scanf("%lf",&a[i]);
    scanf("%s",m[i][]);
    
    if(m[i][0] == "B")
      tot += a[i] * 380000;
    else 
      tot += a[i];
  }
  
  printf("%lf",tot);
  
  return 0;
  
}


Compiler output:
main.c: In function 'main':
main.c:15:21: error: expected expression before ']' token
   15 |     scanf("%s",m[i][]);
      |                     ^
main.c:17:16: warning: comparison between pointer and integer
   17 |     if(m[i][0] == "B")
      |                ^~
Language: C

#include<stdio.h>

int main(){
  int num,jap,i;
  float btc,temp,sum;
  String type;
  scanf("%d",num);
  for(i=1;i<=num;i++){
    scanf("%f %s",temp,type);
    if(type=="JPY"){ jap=temp;}
    else {btc=temp;}
  }
  sum = jap+btc*380000.0;
}

Compiler output:
main.c: In function 'main':
main.c:6:3: error: unknown type name 'String'
    6 |   String type;
      |   ^~~~~~
main.c:10:12: warning: comparison between pointer and integer
   10 |     if(type=="JPY"){ jap=temp;}
      |            ^~
Language: C++

#include <iostream>

int main() {

  int N;
  int x;
  std::string u;
  int sum;
  sum = 0;

  std::cin >> N;
  for (i = 0; i < N; i++) {
    std::cin >> x >> u;
    if (u == "JPY") {
      sum += x;
    } else if (u == "BTC") {
      double tmp;
      tmp = x * 380000.0;
      sum += tmp;
    }
  }
  std::cout << sum << std::endl;
  return 0;
}

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

#include <iostream>

int main() {

  int N;
  int x;
  int u;
  int sum;
  sum = 0;
  
  std::cin >> N;
  for (int i = 0; i < N; i++) {
    std::cin >> x >> u;
    if (u == "JPY") {
      sum += x;
    } else if (u == "BTC") {
      int tmp;
      tmp = x * 380000.0;
      sum += tmp;
    }
  }
  std::cout << sum << std::endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |     if (u == "JPY") {
      |         ~~^~~~~~~~
a.cc:16:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |     } else if (u == "BTC") {
      |                ~~^~~~~~~~
Language: C++

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

int main()
{
    int err;
    int N;
    struct INPUTDATA{
        double x;
        char u[4];
    };
    struct INPUTDATA *indata;
    int i;
    double j_sum, b_sum;
    double sum;

    err = scanf("%d", &N);

    indata = malloc(sizeof(struct INPUTDATA) * N);
    for(i=0;i<N;i++){
        err = scanf("%lf %s", &indata[i].x, &indata[i].u);
    }

    sum = 0;
    j_sum = b_sum = 0;
    for(i=0;i<N;i++){
        //printf("%lf %s\n", indata[i].x, indata[i].u);
        sum += indata[i].x;
        if( indata[i].u[0] == 'J'){
            j_sum += indata[i].x;
        }else if( indata[i].u[0] == 'B'){
            b_sum += indata[i].x * 380000.0;
        }
    }
    sum = j_sum + b_sum;
//    printf("%lf, %lf", j_sum, b_sum);

    printf("%lf", sum);


    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:20: error: invalid conversion from 'void*' to 'main()::INPUTDATA*' [-fpermissive]
   20 |     indata = malloc(sizeof(struct INPUTDATA) * N);
      |              ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                    |
      |                    void*
Language: C++

#include <iostream>

int main() {

  int N;
  int x;
  int u;
  int sum;
  sum = 0;
  
  std::cin >> N;
  for (i = 0; i < N; i++) {
    std::cin >> x >> u;
    if (u == "JPY") {
      sum += x;
    } else if (u == "BTC") {
      int tmp;
      tmp = x * 380000.0;
      sum += tmp;
    }
  }
  std::cout << sum << std::endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:8: error: 'i' was not declared in this scope
   12 |   for (i = 0; i < N; i++) {
      |        ^
a.cc:14:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |     if (u == "JPY") {
      |         ~~^~~~~~~~
a.cc:16:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |     } else if (u == "BTC") {
      |                ~~^~~~~~~~
Language: Java

import java.util.*;
 
public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   int num = Integer.parseInt(sc.nextLine());
   long jap = long.parseLong(sc.nextLine());
   long btc = long.parseLong(sc.nextLine());
   long sum = jap + btc *380000.0;
   System.out.println(sum);
	}
}

Compiler output:
Main.java:7: error: class expected
   long jap = long.parseLong(sc.nextLine());
                   ^
Main.java:7: error: ';' expected
   long jap = long.parseLong(sc.nextLine());
                            ^
Main.java:7: error: ';' expected
   long jap = long.parseLong(sc.nextLine());
                                          ^
Main.java:8: error: class expected
   long btc = long.parseLong(sc.nextLine());
                   ^
Main.java:8: error: ';' expected
   long btc = long.parseLong(sc.nextLine());
                            ^
Main.java:8: error: ';' expected
   long btc = long.parseLong(sc.nextLine());
                                          ^
6 errors
Language: C++

#include <iostream>

int main() {

  int N;
  int x;
  int u;
  int sum;
  sum = 0;

  for (i = 0; i < N; i++) {
    std::cin >> x >> u;
    if (u == "JPY") {
      sum += x;
    } else if (u == "BTC") {
      int tmp;
      tmp = x * 380000.0;
      sum += tmp;
    }
  }
  std::cout << sum << std::endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: 'i' was not declared in this scope
   11 |   for (i = 0; i < N; i++) {
      |        ^
a.cc:13:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |     if (u == "JPY") {
      |         ~~^~~~~~~~
a.cc:15:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |     } else if (u == "BTC") {
      |                ~~^~~~~~~~
Language: C

#include <stdio.h>

int main(void){
 
  int n;
  int i;
  scanf("%d",&n);
  
  char m[n][3];
  double a[n];
  double tot = 0;
  
  for(i = 0; i < n; i++){
    scanf("%s",a[i]);
    scanf("%s"m[i]);
    
    if(m[i] = "BTC")
      tot += a[i] * 380000;
    else 
      tot += a[i];
  }
  
  printf("%lf",tot);
  
  return 0;
  
}


Compiler output:
main.c: In function 'main':
main.c:15:15: error: expected ')' before 'm'
   15 |     scanf("%s"m[i]);
      |          ~    ^
      |               )
main.c:17:13: error: assignment to expression with array type
   17 |     if(m[i] = "BTC")
      |             ^
Language: C++

#include <iostream>

int main() {

  int N;
  int x;
  int u;
  int sum;
  sum = 0;

  for (i = 0; i < N; i++) {
    std::cin >> x >> u;
    if (u == "JPY") {
      sum += x;
    } else if (u == "BTC") {
      int tmp;
      tmp = x * 380000.0 sum += tmp;
    }
  }
  std::cout << sum << std::endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: 'i' was not declared in this scope
   11 |   for (i = 0; i < N; i++) {
      |        ^
a.cc:13:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |     if (u == "JPY") {
      |         ~~^~~~~~~~
a.cc:15:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |     } else if (u == "BTC") {
      |                ~~^~~~~~~~
a.cc:17:25: error: expected ';' before 'sum'
   17 |       tmp = x * 380000.0 sum += tmp;
      |                         ^~~~
      |                         ;
Language: C

#include <stdio.h>

int main(void){
 
  int n;
  scanf("%d",&n);
  
  char m[n][3];
  double a[n];
  double tot = 0;
  
  for(i = 0; i < n; i++){
    scanf("%s",a[i]);
    scanf("%s"m[i]);
    
    if(m[i] = "BTC")
      tot += a[i] * 380000;
    else 
      tot += a[i];
  }
  
  printf("%lf",tot);
  
  return 0;
  
}

Compiler output:
main.c: In function 'main':
main.c:12:7: error: 'i' undeclared (first use in this function)
   12 |   for(i = 0; i < n; i++){
      |       ^
main.c:12:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:15: error: expected ')' before 'm'
   14 |     scanf("%s"m[i]);
      |          ~    ^
      |               )
Language: Java

import java.util.*;
 
public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   int num = Integer.parseInt(sc.nextLine());
   long jap = sc.nextLine();
   long btc = sc.nextLine();
   long sum = jap + btc *380000.0;
   System.out.println(sum);
	}
}

Compiler output:
Main.java:7: error: incompatible types: String cannot be converted to long
   long jap = sc.nextLine();
                         ^
Main.java:8: error: incompatible types: String cannot be converted to long
   long btc = sc.nextLine();
                         ^
Main.java:9: error: incompatible types: possible lossy conversion from double to long
   long sum = jap + btc *380000.0;
                  ^
3 errors
Language: C++

#include <vector>
#include <iostream>
#include <cmath>
#include <string>
#include <cstring>
#include <algorithm>
#include <numeric>
#include <cstdlib>
using namespace std;
typedef long long ll;

int main(){
  int n;
  cin >> n;
  ll ans = 0;
  for(int i=0;i<n;i++) {
    long long double money;
    string moneyT;
    cin >> money;
    cin >> moneyT;
    if(moneyT == "BTC") {
      ans += money * 380000;
    } else {
      ans += money;
    }
  }

  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:10: error: 'long long' specified with 'double'
   17 |     long long double money;
      |          ^~~~