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

#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for(int i = 0; i < n; i++)
int main(){ 
    ll n;
    cin>>n;
    double a;
    string s;
    ll b=0;
    REP(i,n){
        cin>>a>>s;
    if(s=="JPY"){
        b+=a;
    }else{
        b+=a*380000;
    }
    }
    cout<<b;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'll' was not declared in this scope
    5 |     ll n;
      |     ^~
a.cc:6:10: error: 'n' was not declared in this scope; did you mean 'yn'?
    6 |     cin>>n;
      |          ^
      |          yn
a.cc:9:7: error: expected ';' before 'b'
    9 |     ll b=0;
      |       ^~
      |       ;
a.cc:13:9: error: 'b' was not declared in this scope
   13 |         b+=a;
      |         ^
a.cc:15:9: error: 'b' was not declared in this scope
   15 |         b+=a*380000;
      |         ^
a.cc:18:11: error: 'b' was not declared in this scope
   18 |     cout<<b;
      |           ^
Language: C

#include <stdio.h>
#include <math.h>
#include <string.h>
#define pai 3.1415926535

int main(void) {
	int N;
	scanf("%d", &N);
	double x[10];
	char u[10];
	double sum = 0.0;
	for (int i = 0; i < N; i++) {
		scanf("%lf%s", &x[i], &u);
		if (u[0] == 'J') {
			sum += x[i];
		}
		else {
			sum += 380000.0 * x[i];
		}
	}
	
	printf("%f\n", sum);


	return 0;



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

#include <math.h>
using namespace std;
int main(){
  int N,ans=0;
  cin>>N;
  double x[N],B=0.0;
  string u[N];
  for(int i=0;i<N;i++) cin>>x[i]>>u[i];
  for(int i=0;i<N;i++){
    if(u[i]=="JPY") ans+=x[i];
    else B+=x[i];
  }
  cout<<ans+B*380000.0<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin>>N;
      |   ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <math.h>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:7:3: error: 'string' was not declared in this scope
    7 |   string u[N];
      |   ^~~~~~
a.cc:2:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    1 | #include <math.h>
  +++ |+#include <string>
    2 | using namespace std;
a.cc:8:35: error: 'u' was not declared in this scope
    8 |   for(int i=0;i<N;i++) cin>>x[i]>>u[i];
      |                                   ^
a.cc:10:8: error: 'u' was not declared in this scope
   10 |     if(u[i]=="JPY") ans+=x[i];
      |        ^
a.cc:13:3: error: 'cout' was not declared in this scope
   13 |   cout<<ans+B*380000.0<<endl;
      |   ^~~~
a.cc:13:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:25: error: 'endl' was not declared in this scope
   13 |   cout<<ans+B*380000.0<<endl;
      |                         ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <math.h>
  +++ |+#include <ostream>
    2 | using namespace std;
Language: C++

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

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
int t;
double bc= 380000.0;

int a;
double e;
double v;
double n;

cin>>t;
double x[t]={0};
string c;
for(int q=0;q<t;q++){
    cin>>e>>c;
    if(c=="JPY"){
        x[q]=e;
    }
   else if(c=="BTC"){
        x[q]=e*bc;
    }

}
for(int b=0;b<t;b++){
        n=x[b+1];
    x[b]=x[b]+x[b+1];

}
x=x-n;
cout<<x;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:36:4: error: invalid operands of types 'double [t]' and 'double' to binary 'operator-'
   36 | x=x-n;
      |   ~^~
      |   | |
      |   | double
      |   double [t]
Language: C++

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

int main() {
  
  int N;
  cin >> N;
  
  vector<double> x(N);
  vector<string> y(N);
  
  double num = 0.0;
  double num2;
  
  for(int i = 0;i < N;++i){
    cin >> x[i] >> y[i];
  }
  
  for(int i = 0;i < N;++i){
    if(y[i] == "JPY"){
      num2 = x[i];
    }
    else{
      num2 = x[i] * 380000;
    }
  num = num2 + num;
  }


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

int main(){
  int n;
  cin >> n;
  double x;
  int count = 0;
  string s;
  for(int i=0;i<n;i++){
    cin >> x >> s;
    if(s=="BTC"){
      x*=380000;
      count += x;
    }else{
      count += x;
    }
  }
  cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin >> n;
      |   ^~~
a.cc:6:3: error: 'string' was not declared in this scope
    6 |   string s;
      |   ^~~~~~
a.cc:8:17: error: 's' was not declared in this scope
    8 |     cin >> x >> s;
      |                 ^
a.cc:16:3: error: 'cout' was not declared in this scope; did you mean 'count'?
   16 |   cout << count << endl;
      |   ^~~~
      |   count
a.cc:16:20: error: 'endl' was not declared in this scope
   16 |   cout << count << endl;
      |                    ^~~~
Language: C++

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

int main(void){
int N;
scanf("%d",&N);
double x[N];
double s[N];
char u[N],r[i],o[i];
double sum;
for(int i=0;i<N;i++){
    scanf("%lf %c%c%c",&x[i],&u[i],&r[i],o[i]);
}

for(int i=0;i<N;i++){
    if(u[i]=='J'){s[N]=x[i];}
    else{s[N]=x[i]*380000;}
}

sum=0;

for(int i=0;i<N;i++){
    sum+=s[i];
}

printf("%lf",sum);



}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: 'i' was not declared in this scope
   12 | char u[N],r[i],o[i];
      |             ^
a.cc:15:37: error: 'r' was not declared in this scope
   15 |     scanf("%lf %c%c%c",&x[i],&u[i],&r[i],o[i]);
      |                                     ^
a.cc:15:42: error: 'o' was not declared in this scope
   15 |     scanf("%lf %c%c%c",&x[i],&u[i],&r[i],o[i]);
      |                                          ^
Language: C++

N = int(input())
otoshidama = []
for n in range(N):
    val, cur = map(str, input().split())
    val = float(val)
    if cur == "BTC":
        val *= 380000
    otoshidama.append(val)
print(sum(otoshidama))


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

N=int(input())
otoshidama = []
for n in range(N):
    val, cur = map(str, input().split())
    val = float(val)
    if cur == "BTC":
        val *= 380000
    otoshidama.append(val)
print(sum(otoshidama))


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

N=int(input())
otoshidama = []
for n in range(N):
    val, cur = map(str, input().split())
    val = float(val)
    #print(val, cur)
    #print(type(val), type(cur))
    if cur == "BTC":
        val *= 380000
    otoshidama.append(val)
print(sum(otoshidama))


Compiler output:
a.cc:6:6: error: invalid preprocessing directive #print
    6 |     #print(val, cur)
      |      ^~~~~
a.cc:7:6: error: invalid preprocessing directive #print
    7 |     #print(type(val), type(cur))
      |      ^~~~~
a.cc:1:1: error: 'N' does not name a type
    1 | N=int(input())
      | ^
Language: C++

#include <iostream>
#include <iomanip>
#include <string>
using namespace std;
int main(){
  int N;cin>>N;
  vector<double>X(N);
  vector<string>U(N);
  for (int i=0;i<N;++i){
    cin>>X[i]>>U[i];
  }
  int sum=0;
  for (int i=0;i<N;++i){
    if (U[i]=="JPY"){
      sum+=X[i];
    }
    else sum+=X[i]*380000;
  }
  cout<<sum<<endl;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   vector<double>X(N);
      |   ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include <iomanip>
  +++ |+#include <vector>
    3 | #include <string>
a.cc:7:10: error: expected primary-expression before 'double'
    7 |   vector<double>X(N);
      |          ^~~~~~
a.cc:8:16: error: expected primary-expression before '>' token
    8 |   vector<string>U(N);
      |                ^
a.cc:8:17: error: 'U' was not declared in this scope
    8 |   vector<string>U(N);
      |                 ^
a.cc:10:10: error: 'X' was not declared in this scope
   10 |     cin>>X[i]>>U[i];
      |          ^
a.cc:15:12: error: 'X' was not declared in this scope
   15 |       sum+=X[i];
      |            ^
a.cc:17:15: error: 'X' was not declared in this scope
   17 |     else sum+=X[i]*380000;
      |               ^
Language: C++

#include <iostream>
#include <iomanip>
#include <string>
using namesapce std;
int main(){
  int N;cin>>N;
  vector<double>X(N);
  vector<string>U(N);
  for (int i=0;i<N;++i){
    cin>>X[i]>>U[i];
  }
  int sum=0;
  for (int i=0;i<N;++i){
    if (U[i]=="JPY"){
      sum+=X[i];
    }
    else sum+=X[i]*380000;
  }
  cout<<sum<<endl;
}
  

Compiler output:
a.cc:4:7: error: expected nested-name-specifier before 'namesapce'
    4 | using namesapce std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   int N;cin>>N;
      |         ^~~
      |         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:7:3: error: 'vector' was not declared in this scope
    7 |   vector<double>X(N);
      |   ^~~~~~
a.cc:7:10: error: expected primary-expression before 'double'
    7 |   vector<double>X(N);
      |          ^~~~~~
a.cc:8:10: error: 'string' was not declared in this scope
    8 |   vector<string>U(N);
      |          ^~~~~~
a.cc:8:10: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:8:17: error: 'U' was not declared in this scope
    8 |   vector<string>U(N);
      |                 ^
a.cc:10:10: error: 'X' was not declared in this scope
   10 |     cin>>X[i]>>U[i];
      |          ^
a.cc:15:12: error: 'X' was not declared in this scope
   15 |       sum+=X[i];
      |            ^
a.cc:17:15: error: 'X' was not declared in this scope
   17 |     else sum+=X[i]*380000;
      |               ^
a.cc:19:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   19 |   cout<<sum<<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:19:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   19 |   cout<<sum<<endl;
      |              ^~~~
      |              std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (n); i++)
int main() {
  int n,ans=0;
  cin>>n;
  vector<double> a(n),b(n);
  rep(i,n) cin>>a[i]>>b[i];
  rep(i,n){
    if(b[i]=="JPY"){
      ans+=a[i];
    }else{
      ans+=a[i]*380000;
    }
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<double>, double>::value_type' {aka 'double'} and 'const char [4]' to binary 'operator=='
   10 |     if(b[i]=="JPY"){
Language: C++

#include<bits/stdc++.h>
using namespace std;
main(){
  int n;
  double s=0.0,x=0.0;
  string u;
  cin>>n;
  while(n--){
    cin>>x>>u;
    s+=(u=="BTC"?380000.0:1.0)*i;
  }
  cout<<s;
}

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:10:32: error: 'i' was not declared in this scope
   10 |     s+=(u=="BTC"?380000.0:1.0)*i;
      |                                ^
Language: C

#include <stdil.h>
 
int main(){
  int n;if(scanf("%d",&n)==1){}
  int i;double sum=0;
  double x[n];
  char u[n][3];
  for(i=0;i<n;i++){
    if(scanf("%lf",&x[i])==1 && scanf("%s",u[i])==1){}
    if(u[i][0]=='J'){
      sum += x[i];
    }else{
      sum += x[i]*380000;
    }
  }
  printf("%lf",sum);
  return 0;
}

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

#include <stdil.h>

int main(){
  int n;if(scanf("%d",&n)==1){}
  int i;double sum=0;
  double x[n];
  char u[n];
  for(i=0;i<n;i++){
    if(scanf("%lf",&x[i])==1 && scanf("%s",u[i])==1){}
    if(u[i]=='JPY'){
      sum += x[i];
    }else{
      sum += x[i]*380000;
    }
  }
  printf("%lf",sum);
  return 0;
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:26: error: expected ';' before '}' token
   15 |       sum += x * 380000.0
      |                          ^
      |                          ;
   16 |     }
      |     ~
Language: C++

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<bool> vb;
#define pb push_back
#define mp make_pair
#define f first
#define s second
#define in insert
#define FOR(i,a,b) for (int i = a; i < b; i++)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define speed ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
const int INF = 1e9 + 5;
int main(){
    int n;
    cin >> n;
    dobule sum = 0;
    for(int i = 0; i < n; i++){
        double x;
        cin >> x;
        string s;
        cin >> s;
        if(s == "BTC") sum += x * 380000;
        else sum += x;
    }
    cout << fixed << setprecision(6) << sum;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:5: error: 'dobule' was not declared in this scope; did you mean 'double'?
   21 |     dobule sum = 0;
      |     ^~~~~~
      |     double
a.cc:27:24: error: 'sum' was not declared in this scope
   27 |         if(s == "BTC") sum += x * 380000;
      |                        ^~~
a.cc:28:14: error: 'sum' was not declared in this scope
   28 |         else sum += x;
      |              ^~~
a.cc:30:41: error: 'sum' was not declared in this scope
   30 |     cout << fixed << setprecision(6) << sum;
      |                                         ^~~
Language: C++

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

int main() {
	int n;
	cin >> n;
	int ans = 0;
	for (int i = 0;i < n;++i) {
		int x;
		cin >> x;
		string s;
		cin >> s;
		if (s = 'JPY')ans += x;
		if (s = 'BTC')ans += x * 380000;
	}
	cout << ans << endl;
}

Compiler output:
a.cc:15:25: warning: multi-character character constant [-Wmultichar]
   15 |                 if (s = 'JPY')ans += x;
      |                         ^~~~~
a.cc:16:25: warning: multi-character character constant [-Wmultichar]
   16 |                 if (s = 'BTC')ans += x * 380000;
      |                         ^~~~~
a.cc: In function 'int main()':
a.cc:15:25: warning: overflow in conversion from 'int' to 'char' changes value from '4870233' to '89' [-Woverflow]
   15 |                 if (s = 'JPY')ans += x;
      |                         ^~~~~
a.cc:15:23: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(89)' from 'std::__cxx11::basic_string<char>' to 'bool'
   15 |                 if (s = 'JPY')ans += x;
      |                     ~~^~~~~~~
      |                       |
      |                       std::__cxx11::basic_string<char>
a.cc:16:25: warning: overflow in conversion from 'int' to 'char' changes value from '4346947' to '67' [-Woverflow]
   16 |                 if (s = 'BTC')ans += x * 380000;
      |                         ^~~~~
a.cc:16:23: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(67)' from 'std::__cxx11::basic_string<char>' to 'bool'
   16 |                 if (s = 'BTC')ans += x * 380000;
      |                     ~~^~~~~~~
      |                       |
      |                       std::__cxx11::basic_string<char>
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: conflicting declaration 'std::vector<int> x [N]'
    8 |     vector<int> x[N];
      |                 ^
a.cc:7:9: note: previous declaration as 'int x'
    7 |     int x, u;
      |         ^
a.cc:10:17: error: invalid types 'int[int]' for array subscript
   10 |         cin >> x[i];
      |                 ^
a.cc:12:20: error: conflicting declaration 'std::vector<std::__cxx11::basic_string<char> > u [N]'
   12 |     vector<string> u[N];
      |                    ^
a.cc:7:12: note: previous declaration as 'int u'
    7 |     int x, u;
      |            ^
a.cc:14:17: error: invalid types 'int[int]' for array subscript
   14 |         cin >> u[i];
      |                 ^
a.cc:19:14: error: invalid types 'int[int]' for array subscript
   19 |          if(u[i] == "BTC"){
      |              ^
a.cc:20:15: error: invalid types 'int[int]' for array subscript
   20 |              x[i] *= 380000;
      |               ^
a.cc:21:22: error: invalid types 'int[int]' for array subscript
   21 |              ans += x[i];
      |                      ^
a.cc:24:22: error: invalid types 'int[int]' for array subscript
   24 |              ans += x[i];
      |                      ^
Language: C++

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

int main() {
  int N;
  cin >> N;
  pair<double, string> A[N];
  double sum = 0;
  for(int i=0;i<N;i++){
    cin >> A[i].first >> A[i].second;
    if(A[i].second == JPY){
      sum += A[i].first;
    }
    else {
      sum += A[i].first * 380000;
    }
  }
  cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:23: error: 'JPY' was not declared in this scope
   11 |     if(A[i].second == JPY){
      |                       ^~~
Language: C

#include <stdio.h>
#inlcude <math.h>
int main (void)
{
  int N,s;
  double x;
  char c;
  
  scanf("%d",&N);
  
  s=0;
  
  for (i=0; i<N; i++){
    scanf("%lf %s",&x,&c);
    if (c = "JPY")
      s += x;
    else if (c= "BTC")
      s += x * 380000;
  }
  printf("%d",s);
  
  return 0;
}

Compiler output:
main.c:2:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    2 | #inlcude <math.h>
      |  ^~~~~~~
      |  include
main.c: In function 'main':
main.c:13:8: error: 'i' undeclared (first use in this function)
   13 |   for (i=0; i<N; i++){
      |        ^
main.c:13:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:11: error: assignment to 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
   15 |     if (c = "JPY")
      |           ^
main.c:17:15: error: assignment to 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
   17 |     else if (c= "BTC")
      |               ^
Language: C

#include <stdio.h>
#inlcude <math.h>
int main (void)
{
  int N,s;
  double x;
  char c;
  
  scanf("%d",&N);
  
  s=0;
  
  for (i=0; i<N; i++){
    scanf("%d %s",&x,&c);
    if (c = 'J')
      s+=x;
    else if (c= 'B')
      s+=x * 380000;
  }
  printf("%d",s);
  
  return 0;
}

Compiler output:
main.c:2:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    2 | #inlcude <math.h>
      |  ^~~~~~~
      |  include
main.c: In function 'main':
main.c:13:8: error: 'i' undeclared (first use in this function)
   13 |   for (i=0; i<N; i++){
      |        ^
main.c:13:8: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#inlcude <math.h>
int main (void)
{
  int N,s;
  double x;
  char c;
  
  scanf("%d",&N);
  
  s=0;
  
  for (i=0; i<N; i++){
    scanf("%d %s",&x,&c);
    if (c = 'JPY')
      s+=x;
    else if (c= 'BTC')
      s+=x * 380000;
  }
  printf("%d",s);
  
  return 0;
}

Compiler output:
main.c:2:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    2 | #inlcude <math.h>
      |  ^~~~~~~
      |  include
main.c: In function 'main':
main.c:13:8: error: 'i' undeclared (first use in this function)
   13 |   for (i=0; i<N; i++){
      |        ^
main.c:13:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:13: warning: multi-character character constant [-Wmultichar]
   15 |     if (c = 'JPY')
      |             ^~~~~
main.c:15:13: warning: overflow in conversion from 'int' to 'char' changes value from '4870233' to '89' [-Woverflow]
main.c:17:17: warning: multi-character character constant [-Wmultichar]
   17 |     else if (c= 'BTC')
      |                 ^~~~~
main.c:17:17: warning: overflow in conversion from 'int' to 'char' changes value from '4346947' to '67' [-Woverflow]
Language: C

#include <stdio.h>
#inlcude <math.h>
int main (void)
{
  int N,s;
  double x;
  char c;
  
  scanf("%d",N);
  
  s=0;
  
  for (i=0; i<N; i++){
    scanf("%d %s",x,c);
    if (c = 'JPY')
      s+=x;
    else if (c= 'BTC')
      s+=x * 380000;
  }
  printf("%d",s);
  
  return 0;
}

Compiler output:
main.c:2:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    2 | #inlcude <math.h>
      |  ^~~~~~~
      |  include
main.c: In function 'main':
main.c:13:8: error: 'i' undeclared (first use in this function)
   13 |   for (i=0; i<N; i++){
      |        ^
main.c:13:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:13: warning: multi-character character constant [-Wmultichar]
   15 |     if (c = 'JPY')
      |             ^~~~~
main.c:15:13: warning: overflow in conversion from 'int' to 'char' changes value from '4870233' to '89' [-Woverflow]
main.c:17:17: warning: multi-character character constant [-Wmultichar]
   17 |     else if (c= 'BTC')
      |                 ^~~~~
main.c:17:17: warning: overflow in conversion from 'int' to 'char' changes value from '4346947' to '67' [-Woverflow]
Language: C

#include <stdio.h>
#inlcude <math.h>
int main (void)
{
  int N,s;
  double x;
  char c;
  
  scanf("%d",N);
  
  s=0;
  
  for (i=0; i<N; i++){
    scanf("%d %s",x,c);
    if (c = 'JPY')
      s+=x[i];
    else if (c= 'BTC')
      s+=x[i] * 380000;
  }
  printf("%d",s);
  
  return 0;
}

Compiler output:
main.c:2:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    2 | #inlcude <math.h>
      |  ^~~~~~~
      |  include
main.c: In function 'main':
main.c:13:8: error: 'i' undeclared (first use in this function)
   13 |   for (i=0; i<N; i++){
      |        ^
main.c:13:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:13: warning: multi-character character constant [-Wmultichar]
   15 |     if (c = 'JPY')
      |             ^~~~~
main.c:15:13: warning: overflow in conversion from 'int' to 'char' changes value from '4870233' to '89' [-Woverflow]
main.c:17:17: warning: multi-character character constant [-Wmultichar]
   17 |     else if (c= 'BTC')
      |                 ^~~~~
main.c:17:17: warning: overflow in conversion from 'int' to 'char' changes value from '4346947' to '67' [-Woverflow]
Language: C

#include <stdio.h>
#inlcude <math.h>
int main (void)
{
  int N,s;
  int x;
  char c;
  
  scanf("%d",N);
  
  s=0;
  
  for (i=0; i<N; i++){
    scanf("%d %s",x,c);
    if (c = 'JPY')
      s+=x[i];
    else if (c= 'BTC')
      s+=x[i] * 380000;
  }
  printf("%d",s);
  
  return 0;
}

Compiler output:
main.c:2:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    2 | #inlcude <math.h>
      |  ^~~~~~~
      |  include
main.c: In function 'main':
main.c:13:8: error: 'i' undeclared (first use in this function)
   13 |   for (i=0; i<N; i++){
      |        ^
main.c:13:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:13: warning: multi-character character constant [-Wmultichar]
   15 |     if (c = 'JPY')
      |             ^~~~~
main.c:15:13: warning: overflow in conversion from 'int' to 'char' changes value from '4870233' to '89' [-Woverflow]
main.c:17:17: warning: multi-character character constant [-Wmultichar]
   17 |     else if (c= 'BTC')
      |                 ^~~~~
main.c:17:17: warning: overflow in conversion from 'int' to 'char' changes value from '4346947' to '67' [-Woverflow]
Language: C

#include <stdio.h>
#inlcude <math.h>
int main (void)
{
  int N,s;
  int x[10];
  char c;
  
  scanf("%d",N);
  
  s=0;
  
  for (i=0; i<N; i++){
    scanf("%d %s",x,c);
    if (c = 'JPY')
      s+=x[i];
    else if (c= 'BTC')
      s+=x[i] * 380000;
  }
  printf("%d",s);
  
  return 0;
}

Compiler output:
main.c:2:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    2 | #inlcude <math.h>
      |  ^~~~~~~
      |  include
main.c: In function 'main':
main.c:13:8: error: 'i' undeclared (first use in this function)
   13 |   for (i=0; i<N; i++){
      |        ^
main.c:13:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:13: warning: multi-character character constant [-Wmultichar]
   15 |     if (c = 'JPY')
      |             ^~~~~
main.c:15:13: warning: overflow in conversion from 'int' to 'char' changes value from '4870233' to '89' [-Woverflow]
main.c:17:17: warning: multi-character character constant [-Wmultichar]
   17 |     else if (c= 'BTC')
      |                 ^~~~~
main.c:17:17: warning: overflow in conversion from 'int' to 'char' changes value from '4346947' to '67' [-Woverflow]
Language: C

#include <stdio.h>
#inlcude <math.h>
int main (void)
{
  int N,s;
  int x[10];
  char c;
  
  scanf("%d",N);
  
  s=0;
  
  for (i=0; i<N; i++){
    scanf("%d %s",x[i],c);
    if (c = 'JPY')
      s+=x[i];
    else if (c= 'BTC')
      s+=x[i] * 380000;
  }
  
  return 0;
}

Compiler output:
main.c:2:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    2 | #inlcude <math.h>
      |  ^~~~~~~
      |  include
main.c: In function 'main':
main.c:13:8: error: 'i' undeclared (first use in this function)
   13 |   for (i=0; i<N; i++){
      |        ^
main.c:13:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:13: warning: multi-character character constant [-Wmultichar]
   15 |     if (c = 'JPY')
      |             ^~~~~
main.c:15:13: warning: overflow in conversion from 'int' to 'char' changes value from '4870233' to '89' [-Woverflow]
main.c:17:17: warning: multi-character character constant [-Wmultichar]
   17 |     else if (c= 'BTC')
      |                 ^~~~~
main.c:17:17: warning: overflow in conversion from 'int' to 'char' changes value from '4346947' to '67' [-Woverflow]
Language: C

#include <stdio.h>
#inlcude <math.h>
int main (void)
{
  int N,s;
  int x[10];
  char c;
  
  scanf("%d",N);
  
  s=0;
  
  for (i=0; i<N; i++){
    scanf("%d %s",x[i],c);
    if (c = 'J')
      s+=x[i];
    else if (c= 'B')
      s+=x[i] * 380000;
  }
  
  

Compiler output:
main.c:2:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    2 | #inlcude <math.h>
      |  ^~~~~~~
      |  include
main.c: In function 'main':
main.c:13:8: error: 'i' undeclared (first use in this function)
   13 |   for (i=0; i<N; i++){
      |        ^
main.c:13:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:19:3: error: expected declaration or statement at end of input
   19 |   }
      |   ^
Language: C

#include <stdio.h>
#inlcude <math.h>
int main (void)
{
  int N,s;
  int x[10];
  char c;
  
  scanf("%d",N);
  
  s=0;
  
  for (i=0; i<N; i++){
    scanf("%d %s",x[i],c);
    if (c = "JPY")
      s+=x[i];
    else if (c= "BTC")
      s+=x[i] * 380000;
  }
  
  

Compiler output:
main.c:2:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    2 | #inlcude <math.h>
      |  ^~~~~~~
      |  include
main.c: In function 'main':
main.c:13:8: error: 'i' undeclared (first use in this function)
   13 |   for (i=0; i<N; i++){
      |        ^
main.c:13:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:11: error: assignment to 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
   15 |     if (c = "JPY")
      |           ^
main.c:17:15: error: assignment to 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
   17 |     else if (c= "BTC")
      |               ^
main.c:19:3: error: expected declaration or statement at end of input
   19 |   }
      |   ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define fs first
#define sc second
typedef pair<ll, ll> l_l;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
int main(){
  int n;
  cin>>n;
  double x[n];
  string s[n];
  rep(i,n)cin>>x[i]>>s[i];
  rep(i,n)if(s[i].equals("BTC")) x[i]=x[i]*380000.0;
  double sum=0.0;
  rep(i,n)sum+=x[i];
  cout << sum <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:19: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'equals'
   18 |   rep(i,n)if(s[i].equals("BTC")) x[i]=x[i]*380000.0;
      |                   ^~~~~~
Language: C

  double x[11]={0};
  double sum=0;
  char u[11];
  scanf("%d",&n);
 for(int i=0;i<n;i++)
 {
   scanf("%lf %s",&x[i],&u[i]);
   if(u[i]=='B'){
     sum=sum+(x[i]*380000.0);
   }
   else{
    sum=sum+x[i];
   }
 }
  printf("%f",sum);
  return 0;
}

Compiler output:
main.c:4:9: error: expected declaration specifiers or '...' before string constant
    4 |   scanf("%d",&n);
      |         ^~~~
main.c:4:14: error: expected declaration specifiers or '...' before '&' token
    4 |   scanf("%d",&n);
      |              ^
main.c:5:2: error: expected identifier or '(' before 'for'
    5 |  for(int i=0;i<n;i++)
      |  ^~~
main.c:5:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    5 |  for(int i=0;i<n;i++)
      |               ^
main.c:5:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
    5 |  for(int i=0;i<n;i++)
      |                   ^~
main.c:15:10: error: expected declaration specifiers or '...' before string constant
   15 |   printf("%f",sum);
      |          ^~~~
main.c:15:15: error: expected declaration specifiers or '...' before 'sum'
   15 |   printf("%f",sum);
      |               ^~~
main.c:16:3: error: expected identifier or '(' before 'return'
   16 |   return 0;
      |   ^~~~~~
main.c:17:1: error: expected identifier or '(' before '}' token
   17 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int A,D;
  cin >> A;
  vector<string>W(A);
  vector<long long double>H(A);
  for(int i=0;i<A;i++)cin >> H[i] >> W[i];
  long long double C;
  for(int i=0;i<A;i++){
    if(W[i]=="JPY")D+=H[i];
    else C+=H[i];
  }
  C=C*380000+D;
  cout << C << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: 'long long' specified with 'double'
    7 |   vector<long long double>H(A);
      |               ^~~~
a.cc:9:8: error: 'long long' specified with 'double'
    9 |   long long double C;
      |        ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int A,D=1;
  cin >> A;
  vector<string>W(A);
  vector<int>H(A);
  for(int i=0;i<A;i++)cin >> H[i] >> W[i];
  long long double C=0.0;
  for(int i=0;i<A;i++){
    if(W[i]=="JPY")C+=H[i];
    else C+=H[i]*380000.0;
  }
  cout << C << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: 'long long' specified with 'double'
    9 |   long long double C=0.0;
      |        ^~~~
Language: C++


int main() {
    int N;
    cin >> N;
    double sum = 0;
    double jp = 0;
    double bt = 0;
    for(int i = 0; i < N; i++) {
        double x;
        string u;
        cin >> x >> u;
        if(u == "JPY") {
            jp += x;
        } else if(u == "BTC") {
            bt += x;
        }
    }
    // cout << jp << " " << bt << endl;
    bt *= 380000;
    // cout << jp << " " << bt << endl;
    printf("%.5lf", jp+bt);
    // cout << jp + bt << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin >> N;
      |     ^~~
a.cc:10:9: error: 'string' was not declared in this scope
   10 |         string u;
      |         ^~~~~~
a.cc:11:21: error: 'u' was not declared in this scope
   11 |         cin >> x >> u;
      |                     ^
a.cc:21:5: error: 'printf' was not declared in this scope
   21 |     printf("%.5lf", jp+bt);
      |     ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 |
Language: C++

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

int main(){
  int N;
  cin >> N;
  vector<double> x(N);
  vector<string> u(N);
  for(int i=0;i<N;i++){
    cin >> x.at(i);
    cin >> u.at(i);
  }
  double P=0;
  double S=0;
  for(int i=0;i<N;i++){
    if(u.at(i) == "JPY"){
      P += x.at(i);
    }
    else if(u.at(i) == "BTC"){
      S += x.at(i);
    }
  }
  cout << P+S;
}

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

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

int main() {
  int N, x, y, K;
  double k;
  cin >> N;
  string S;
  x = 0;
  y = 0;
   
  	for (int i = 0; i < N; i++) {
      cin >> k >> S;
      if (S == "JPY") {
        x += k;
      }
      else if (S == "BTC") {
        y += k;
        cout << fixed << setpricision(100);
      }
    }
  	double ysum;
  	ysum = 380000 * y;
  	
  	cout << x + ysum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:26: error: 'setpricision' was not declared in this scope
   19 |         cout << fixed << setpricision(100);
      |                          ^~~~~~~~~~~~
Language: C++

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

int main()
{
   int N;
   cin >> N;
   vector<int> x(N);
   vector<string> u(N);
   
   for(int i = 0; i < N; i++)
   {
      cin >> x[i] >> u[i];
      if(u[i] == "BTC")
      {
         sum += 380000*x[i];
      }
      else
      {
         sum += x[i];
      }
   }
   return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:4: error: 'vector' was not declared in this scope
    9 |    vector<int> x(N);
      |    ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | #include<string>
a.cc:9:11: error: expected primary-expression before 'int'
    9 |    vector<int> x(N);
      |           ^~~
a.cc:10:17: error: expected primary-expression before '>' token
   10 |    vector<string> u(N);
      |                 ^
a.cc:10:19: error: 'u' was not declared in this scope
   10 |    vector<string> u(N);
      |                   ^
a.cc:14:14: error: 'x' was not declared in this scope
   14 |       cin >> x[i] >> u[i];
      |              ^
a.cc:17:10: error: 'sum' was not declared in this scope
   17 |          sum += 380000*x[i];
      |          ^~~
a.cc:21:10: error: 'sum' was not declared in this scope
   21 |          sum += x[i];
      |          ^~~
Language: C++

##include <bits/stdc++.h>
using namespace std;
int main () {
    int n; cin >> n;
    vector<double> x(n);
    vector<string> u(n);
    double count=0;
    for (int i=0;i<n;i++) {
        cin >> x[i] >> u[i];
        if(u[i]=="JPN") {
            count+=x[i];
        }
      else if (u[i]=="BTC") {
          count+=x[i]*380000.0;
      }
    }
    cout << count << endl;
}


Compiler output:
a.cc:1:1: error: stray '##' in program
    1 | ##include <bits/stdc++.h>
      | ^~
a.cc:1:3: error: 'include' does not name a type
    1 | ##include <bits/stdc++.h>
      |   ^~~~~~~
a.cc: In function 'int main()':
a.cc:4:12: error: 'cin' was not declared in this scope
    4 |     int n; cin >> n;
      |            ^~~
a.cc:5:5: error: 'vector' was not declared in this scope
    5 |     vector<double> x(n);
      |     ^~~~~~
a.cc:5:12: error: expected primary-expression before 'double'
    5 |     vector<double> x(n);
      |            ^~~~~~
a.cc:6:12: error: 'string' was not declared in this scope
    6 |     vector<string> u(n);
      |            ^~~~~~
a.cc:6:20: error: 'u' was not declared in this scope
    6 |     vector<string> u(n);
      |                    ^
a.cc:9:16: error: 'x' was not declared in this scope
    9 |         cin >> x[i] >> u[i];
      |                ^
a.cc:17:5: error: 'cout' was not declared in this scope; did you mean 'count'?
   17 |     cout << count << endl;
      |     ^~~~
      |     count
a.cc:17:22: error: 'endl' was not declared in this scope
   17 |     cout << count << endl;
      |                      ^~~~
Language: C++

##include <bits/stdc++.h>
using namespace std;
int main () {
    int n; cin >> n;
    vector<double> x(n);
    vector<string> u(n);
    double count=0;
    for (int i=0;i<n;i++) {
        cin >> x[i] >>u[i];
        if(u[i]=="JPN") {
            count+=x[i];
        }
      else if (u[i]=="BTC") {
          count+=x[i]*380000.0;
      }
    }
    cout << count << endl;
}

Compiler output:
a.cc:1:1: error: stray '##' in program
    1 | ##include <bits/stdc++.h>
      | ^~
a.cc:1:3: error: 'include' does not name a type
    1 | ##include <bits/stdc++.h>
      |   ^~~~~~~
a.cc: In function 'int main()':
a.cc:4:12: error: 'cin' was not declared in this scope
    4 |     int n; cin >> n;
      |            ^~~
a.cc:5:5: error: 'vector' was not declared in this scope
    5 |     vector<double> x(n);
      |     ^~~~~~
a.cc:5:12: error: expected primary-expression before 'double'
    5 |     vector<double> x(n);
      |            ^~~~~~
a.cc:6:12: error: 'string' was not declared in this scope
    6 |     vector<string> u(n);
      |            ^~~~~~
a.cc:6:20: error: 'u' was not declared in this scope
    6 |     vector<string> u(n);
      |                    ^
a.cc:9:16: error: 'x' was not declared in this scope
    9 |         cin >> x[i] >>u[i];
      |                ^
a.cc:17:5: error: 'cout' was not declared in this scope; did you mean 'count'?
   17 |     cout << count << endl;
      |     ^~~~
      |     count
a.cc:17:22: error: 'endl' was not declared in this scope
   17 |     cout << count << endl;
      |                      ^~~~
Language: C++

#include "pch.h"
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#include <functional>
#include <map>
#include <iomanip>
#include <math.h> 
#include <stack>
#include <queue>
#include <bitset>
#include <cstdlib>
#include <tuple>
#include <cctype>
#include <ctype.h>
#include <set>
#include <sstream>
#include <time.h>
#include <numeric>
using namespace std;
//#define int long long
#define rep(i,s,n) for(int i = s;i<n;i++)
#define repe(i,s,n) for(int i = s;i<=n;i++)
#define rrep(i,s,n) for(int i = (n)-1;i>=(s);i--)
#define all(v) (v).begin(),(v).end()
#define pb push_back
#define fi first
#define se second
#define chmin(a,b) a=min((a),(b))
#define chmax(a,b) a=max((a),(b))
#define l1 list[index]
#define l2 list[index - 1]
#define l3 list[index + 1]
#define iif(i,j) ((i<0 && j<0) || (i>0 && j>0)) ? true : false 
typedef long long ll;
typedef pair<int, int>pint;
typedef vector<int>vint;
typedef vector<pint>vpint;
typedef pair<pint, int> P1;
typedef pair<int, pint> P2;
typedef pair<pint, pint> PP;
static const ll maxLL = (ll)1 << 62;
const ll MOD = 1000000007;
const ll INF = 1e18;
const double PI = 3.14159265359;
int ca[12] = { 31,28,31,30,31,30,31,31,30,31,30,31 };




signed main() {
	int n, m;
	

	cin >> n;

	double sum = 0;

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

		if (s == "JPY") {
			sum += x;
		}
		else {
			sum += (380000 * x / 1.0);
		}
	}

	cout <<fixed << setprecision(6) << sum << endl;




	return 0;
}

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:25: error: no match for 'operator+=' (operand types are 'double' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   12 |         if(u=="JPY") ans+=u;
      |                      ~~~^~~
a.cc:13:20: error: no match for 'operator*' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
   13 |         else ans+=u*380000;
      |                   ~^~~~~~~
      |                   | |
      |                   | int
      |                   std::string {aka std::__cxx11::basic_string<char>}
Language: C++

#include <iostream>
using namespace std;

int main(){
    int n; cin >> n;
    double x;
    int u;
    double ans=0;
    for(int i=0;i<n;++i){
        cin >> x >> u;
        if(u=="JPY") ans+=u;
        else ans+=u*380000;
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |         if(u=="JPY") ans+=u;
      |            ~^~~~~~~
Language: C++

#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <vector> // vectorを使うためにインクルードする
using namespace std;

int main() {
	int n;
	char a[50];
	float b;

	scanf_s("%d", &n);
	float sum = 0.0;

	for (int i = 0; i <n ;i++) {
		scanf("%f",&b);
		//printf("%f ", b);
		scanf("%s",a);
		//printf("%s", a);
		if (a[0]=='J') {
			sum += b;
		}
		else if (a[0]== 'B') {
			sum += b* 380000.0;
		}
		
	}
	printf("%f", sum);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   12 |         scanf_s("%d", &n);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <vector> // vectorを使うためにインクルードする
using namespace std;

int main() {
	int n;
	char a[50];
	double b;

	scanf_s("%d", &n);
	float sum = 0.0;

	for (int i = 0; i <n ;i++) {
		scanf("%lf %s", &b, a);
		if (a=="JPY") {
			sum += b;
		}
		else if (a== "BTC") {
			sum += b* 380000.0;
		}
		
	}
	printf("%f", sum);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   12 |         scanf_s("%d", &n);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <vector> // vectorを使うためにインクルードする
using namespace std;

int main() {
	int n;
	char a[50];
	double b;

	scanf_s("%d", &n);
	float sum = 0.0;

	for (int i = 0; i <n ;i++) {
		scanf("%lf %s", &b, a);
		if (strcmp(a, "JPY") == 0) {
			sum += b;
		}
		else if (strcmp(a, "BTC") == 0) {
			sum += b* 380000.0;
		}
		
	}
	printf("%f", sum);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   12 |         scanf_s("%d", &n);
      |         ^~~~~~~
      |         scanf
a.cc:17:21: error: 'strcmp' was not declared in this scope
   17 |                 if (strcmp(a, "JPY") == 0) {
      |                     ^~~~~~
a.cc:5:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include <vector> // vectorを使うためにインクルードする
  +++ |+#include <cstring>
    5 | using namespace std;
Language: C++

#include <iostream>
#include <stdio.h>
#include <string>
#include <algorithm>
using namespace std;
 
int main() {
    int N;
    cin >> N;
    double x[N];
    char u[N][4];
    for(int i = 0; i < N; i++) {
        cin >> x[i] >> u[i];
    }
    double Y = 0;
    const double BTC = 380000.0;
    int y[N];

    for(int i = 0; i < N; i++) {
        if(u[i][0] == 'B' &&  u[i][1] == 'T' && u[i][2] == 'C') {
            y[i] = x[i]*BTC;
        }
        else {
            y[i] = (int)x[i];
        }
    }

    for(int i = 0; i < N; i++) {
        Y += y[i];
    }

    printf(%11f, Y);
    
    cout << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:12: error: expected primary-expression before '%' token
   32 |     printf(%11f, Y);
      |            ^
a.cc:32:13: error: unable to find numeric literal operator 'operator""f'
   32 |     printf(%11f, Y);
      |             ^~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
 
int main() {
    int N;
    cin >> N;
    double x[N];
    char u[N][4];
    for(int i = 0; i < N; i++) {
        cin >> x[i] >> u[i];
    }
    double Y = 0;
    const double BTC = 380000.0;
    int y[N];

    for(int i = 0; i < N; i++) {
        if(u[i][0] == 'B' &&  u[i][1] == 'T' && u[i][2] == 'C') {
            y[i] = x[i]*BTC;
        }
        else {
            y[i] = (int)x[i];
        }
    }

    for(int i = 0; i < N; i++) {
        Y += y[i];
    }

    printf(%11f, Y);
    
    cout << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:12: error: expected primary-expression before '%' token
   31 |     printf(%11f, Y);
      |            ^
a.cc:31:13: error: unable to find numeric literal operator 'operator""f'
   31 |     printf(%11f, Y);
      |             ^~~
Language: C++

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

int main() {
  int N, total = 0;
  cin >> N;

  for (int i = 0; i < N; i++) {
    int x, string u;
    cin >> x >> u;
    
    total += x * (u == "BTC") ? 380000 : 1;
  }
  
  cout << total << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: expected initializer before 'u'
    9 |     int x, string u;
      |                   ^
a.cc:10:17: error: 'u' was not declared in this scope
   10 |     cin >> x >> u;
      |                 ^