Language: Java

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
template <class T> inline bool chmin(T &a, T b) {if (a > b){a = b;return true;}return false;}
template <class T> inline bool chmax(T &a, T b) {if (a < b){a = b;return true;}return false;}

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    std::cout<<std::fixed<<std::setprecision(10);
    int n; cin>>n;
    double ans=0;
    rep(i, n){
        double u; 
        string x;
        cin>>u;
        cin>>x;
        if(x=="JPY"){
            ans += u;
        } else {
            ans +=(u*380000.0);
        }
    }
    cout << ans <<endl;
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include <bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <bits/stdc++.h>
         ^
Main.java:3: error: class, interface, enum, or record expected
typedef long long ll;
^
Main.java:4: error: class, interface, enum, or record expected
typedef pair<int, int> P;
^
Main.java:5: error: illegal character: '#'
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
^
Main.java:5: error: class, interface, enum, or record expected
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
        ^
Main.java:5: error: class, interface, enum, or record expected
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
                                  ^
Main.java:5: error: class, interface, enum, or record expected
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
                                                ^
Main.java:6: error: '{' expected
template <class T> inline bool chmin(T &a, T b) {if (a > b){a = b;return true;}return false;}
                 ^
Main.java:6: error: illegal start of type
template <class T> inline bool chmin(T &a, T b) {if (a > b){a = b;return true;}return false;}
                                                 ^
Main.java:6: error: <identifier> expected
template <class T> inline bool chmin(T &a, T b) {if (a > b){a = b;return true;}return false;}
                                                      ^
Main.java:6: error: <identifier> expected
template <class T> inline bool chmin(T &a, T b) {if (a > b){a = b;return true;}return false;}
                                                          ^
Main.java:6: error: illegal start of type
template <class T> inline bool chmin(T &a, T b) {if (a > b){a = b;return true;}return false;}
                                                                               ^
Main.java:7: error: class, interface, enum, or record expected
template <class T> inline bool chmax(T &a, T b) {if (a < b){a = b;return true;}return false;}
^
Main.java:7: error: '{' expected
template <class T> inline bool chmax(T &a, T b) {if (a < b){a = b;return true;}return false;}
                 ^
Main.java:7: error: illegal start of type
template <class T> inline bool chmax(T &a, T b) {if (a < b){a = b;return true;}return false;}
                                                 ^
Main.java:7: error: > or ',' expected
template <class T> inline bool chmax(T &a, T b) {if (a < b){a = b;return true;}return false;}
                                                          ^
Main.java:7: error: illegal start of type
template <class T> inline bool chmax(T &a, T b) {if (a < b){a = b;return true;}return false;}
                                                                               ^
Main.java:11: error: not a statement
    ios::sync_with_stdio(false);
    ^
Main.java:12: error: not a statement
    std::cout<<std::fixed<<std::setprecision(10);
                         ^
Main.java:13: error: not a statement
    int n; cin>>n;
              ^
Main.java:18: error: not a statement
        cin>>u;
           ^
Main.java:19: error: not a statement
        cin>>x;
           ^
Main.java:26: error: not a statement
    cout << ans <<endl;
                ^
Main.java:9: error: unnamed classes are a preview feature and are disabled by default.
int main(){
^
  (use --enable-preview to enable unnamed classes)
Main.java:11: error: ';' expected
    ios::sync_with_stdio(false);
                        ^
Main.java:12: error: ';' expected
    std::cout<<std::fixed<<std::setprecision(10);
                                            ^
Main.java:15: error: ';' expected
    rep(i, n){
             ^
28 errors