Language: C++

using System;
using System.IO;
using System.Linq;
using System.Diagnostics;
using System.Collections.Generic;

using Cons = System.Console;

class Program
{
    int Solve()
    {
        int N = input.nextInt();
        double sum = 0;
        for(int i = 0; i < N; i++){
            double d = input.nextDouble();
            string s = input.next();
            if(s == "JPY"){
                sum += d;
            }
            else{
                sum += (d * 380000.0);
            }
        }
        Cons.WriteLine(sum);
        return 0;
    }

    static Scanner input;
    static int Main(string[] args)
    {
        input = new Scanner();
        var sw = new StreamWriter(Cons.OpenStandardOutput()){AutoFlush = false};
        Cons.SetOut(sw);

        int ret = new Program().Solve();

        Cons.Out.Flush();
        return ret;
    }
}

class RuntimeTimer
{
    public Stopwatch stopwatch;
    public RuntimeTimer()
    {
        stopwatch = new Stopwatch();
    }
    public void Start()
    {
        stopwatch.Start();
    }
    public void Stop()
    {
        stopwatch.Stop();
        Cons.WriteLine();
        Cons.WriteLine($"{stopwatch.ElapsedMilliseconds} sec");
    }
}
class PriorityQueue<T>
{
    private readonly List<T> m_list;
    private readonly Func<T, T, int> m_compare;
    private int m_count;
    public PriorityQueue(int capacity, Func<T, T, int> compare)
    {
        m_list = new List<T>(capacity);
        m_compare = compare;
        m_count = 0;
    }
    private int Add(T value)
    {
        if (m_count == m_list.Count)
        {
            m_list.Add(value);
        }
        else
        {
            m_list[m_count] = value;
        }
        return m_count++;
    }
    private void Swap(int a, int b)
    {
        T tmp = m_list[a];
        m_list[a] = m_list[b];
        m_list[b] = tmp;
    }
    public void Enqueue(T value)
    {
        int c = Add(value);
        while (c > 0)
        {
            int p = (c - 1) / 2;
            if (m_compare(m_list[c], m_list[p]) < 0) { Swap(p, c); } else { break; }
            c = p;
        }
    }
    public T Dequeue()
    {
        T value = m_list[0];
        m_list[0] = m_list[--m_count];
        int p = 0;
        while (true)
        {
            int c1 = p * 2 + 1;
            int c2 = p * 2 + 2;
            if (c1 >= m_count) { break; }
            int c = (c2 >= m_count || m_compare(m_list[c1], m_list[c2]) < 0) ? c1 : c2;
            if (m_compare(m_list[c], m_list[p]) < 0) { Swap(p, c); } else { break; }
            p = c;
        }
        return value;
    }
}
class Scanner
{
    string[] s;
    int i;
 
    char[] cs = new char[] { ' ' };
 
    public Scanner()
    {
        s = new string[0];
        i = 0;
    }
 
    public string next()
    {
        if (i < s.Length) return s[i++];
        string st = Console.ReadLine();
        while (st == "") st = Console.ReadLine();
        s = st.Split(cs, StringSplitOptions.RemoveEmptyEntries);
        if (s.Length == 0) return next();
        i = 0;
        return s[i++];
    }
 
    public int nextInt()
    {
        return int.Parse(next());
    }
    public int[] ArrayInt(int N, int add = 0)
    {
        int[] Array = new int[N];
        for (int i = 0; i < N; i++)
        {
            Array[i] = nextInt() + add;
        }
        return Array;
    }
 
    public long nextLong()
    {
        return long.Parse(next());
    }
 
    public long[] ArrayLong(int N, long add = 0)
    {
        long[] Array = new long[N];
        for (int i = 0; i < N; i++)
        {
            Array[i] = nextLong() + add;
        }
        return Array;
    }
 
    public double nextDouble()
    {
        return double.Parse(next());
    }
 
    public double[] ArrayDouble(int N, double add = 0)
    {
        double[] Array = new double[N];
        for (int i = 0; i < N; i++)
        {
            Array[i] = nextDouble() + add;
        }
        return Array;
    }
}


Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.IO;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Linq;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Diagnostics;
      |       ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
    5 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:7:14: error: 'System' does not name a type
    7 | using Cons = System.Console;
      |              ^~~~~~
a.cc:29:12: error: 'Scanner' does not name a type
   29 |     static Scanner input;
      |            ^~~~~~~
a.cc:30:21: error: 'string' has not been declared
   30 |     static int Main(string[] args)
      |                     ^~~~~~
a.cc:30:30: error: expected ',' or '...' before 'args'
   30 |     static int Main(string[] args)
      |                              ^~~~
a.cc:41:2: error: expected ';' after class definition
   41 | }
      |  ^
      |  ;
a.cc: In member function 'int Program::Solve()':
a.cc:13:17: error: 'input' was not declared in this scope; did you mean 'int'?
   13 |         int N = input.nextInt();
      |                 ^~~~~
      |                 int
a.cc:17:13: error: 'string' was not declared in this scope
   17 |             string s = input.next();
      |             ^~~~~~
a.cc:18:16: error: 's' was not declared in this scope
   18 |             if(s == "JPY"){
      |                ^
a.cc:25:9: error: 'Cons' was not declared in this scope
   25 |         Cons.WriteLine(sum);
      |         ^~~~
a.cc: In static member function 'static int Program::Main(int*)':
a.cc:32:9: error: 'input' was not declared in this scope; did you mean 'int'?
   32 |         input = new Scanner();
      |         ^~~~~
      |         int
a.cc:32:21: error: expected type-specifier before 'Scanner'
   32 |         input = new Scanner();
      |                     ^~~~~~~
a.cc:33:9: error: 'var' was not declared in this scope
   33 |         var sw = new StreamWriter(Cons.OpenStandardOutput()){AutoFlush = false};
      |         ^~~
a.cc:34:9: error: 'Cons' was not declared in this scope
   34 |         Cons.SetOut(sw);
      |         ^~~~
a.cc:34:21: error: 'sw' was not declared in this scope
   34 |         Cons.SetOut(sw);
      |                     ^~
a.cc:36:31: error: invalid conversion from 'Program*' to 'int' [-fpermissive]
   36 |         int ret = new Program().Solve();
      |                               ^
      |                               |
      |                               Program*
a.cc:36:32: error: expected ',' or ';' before '.' token
   36 |         int ret = new Program().Solve();
      |                                ^
a.cc: At global scope:
a.cc:45:11: error: expected ':' before 'Stopwatch'
   45 |     public Stopwatch stopwatch;
      |           ^~~~~~~~~~
      |           :
a.cc:45:12: error: 'Stopwatch' does not name a type
   45 |     public Stopwatch stopwatch;
      |            ^~~~~~~~~
a.cc:46:11: error: expected ':' before 'RuntimeTimer'
   46 |     public RuntimeTimer()
      |           ^~~~~~~~~~~~~
      |           :
a.cc:50:11: error: expected ':' before 'void'
   50 |     public void Start()
      |           ^~~~~
      |           :
a.cc:54:11: error: expected ':' before 'void'
   54 |     public void Stop()
      |           ^~~~~
      |           :
a.cc:60:2: error: expected ';' after class definition
   60 | }
      |  ^
      |  ;
a.cc: In constructor 'RuntimeTimer::RuntimeTimer()':
a.cc:48:9: error: 'stopwatch' was not declared in this scope
   48 |         stopwatch = new Stopwatch();
      |         ^~~~~~~~~
a.cc:48:25: error: expected type-specifier before 'Stopwatch'
   48 |         stopwatch = new Stopwatch();
      |                         ^~~~~~~~~
a.cc: In member function 'void RuntimeTimer::Start()':
a.cc:52:9: error: 'stopwatch' was not declared in this scope
   52 |         stopwatch.Start();
      |         ^~~~~~~~~
a.cc: In member function 'void RuntimeTimer::Stop()':
a.cc:56:9: error: 'stopwatch' was not declared in this scope
   56 |         stopwatch.Stop();
      |         ^~~~~~~~~
a.cc:57:9: error: 'Cons' was not declared in this scope
   57 |         Cons.WriteLine();
      |         ^~~~
a.cc:58:24: error: '$' was not declared in this scope
   58 |         Cons.WriteLine($"{stopwatch.ElapsedMilliseconds} sec");
      |                        ^
a.cc: At global scope:
a.cc:61:7: error: 'PriorityQueue' is not a class template
   61 | class PriorityQueue<T>
      |       ^~~~~~~~~~~~~
a.cc:61:21: error: 'T' was not declared in this scope
   61 | class PriorityQueue<T>
      |                     ^
a.cc:63:12: error: expected ':' before 'readonly'
   63 |     private readonly List<T> m_list;
      |            ^~~~~~~~~
      |            :
a.cc:63:13: error: 'readonly' does not name a type
   63 |     private readonly List<T> m_list;
      |             ^~~~~~~~
a.cc:64:12: error: expected ':' before 'readonly'
   64 |     private readonly Func<T, T, int> m_compare;
      |            ^~~~~~~~~
      |            :
a.cc:64:13: error: 'readonly' does not name a type
   64 |     private readonly Func<T, T, int> m_compare;
      |             ^~~~~~~~
a.cc:65:12: error: expected ':' before 'int'
   65 |     private int m_count;
      |            ^~~~
      |            :
a.cc:66:11: error: expected ':' before 'PriorityQueue'
   66 |     public PriorityQueue(int capacity, Func<T, T, int> compare)
      |           ^~~~~~~~~~~~~~
      |           :
a.cc:66:40: error: 'Func' has not been declared
   66 |     public PriorityQueue(int capacity, Func<T, T, int> compare)
      |                                        ^~~~
a.cc:66:44: error: expected ',' or '...' before '<' token
   66 |     public PriorityQueue(int capacity, Func<T, T, int> compare)
      |                                            ^
a.cc:72:12: error: expected ':' before 'int'
   72 |     private int Add(T value)
      |            ^~~~
      |            :
a.cc:72:21: error: 'T' has not been declared
   72 |     private int Add(T value)
      |                     ^
a.cc:84:12: error: expected ':' before 'void'
   84 |     private void Swap(int a, int b)
      |            ^~~~~
      |            :
a.cc:90:11: error: expected ':' before 'void'
   90 |     public void Enqueue(T value)
      |           ^~~~~
      |           :
a.cc:90:25: error: 'T' has not been declared
   90 |     public void Enqueue(T value)
      |                         ^
a.cc:100:11: error: expected ':' before 'T'
  100 |     public T Dequeue()
      |           ^~
      |           :
a.cc:100:12: error: 'T' does not name a type
  100 |     public T Dequeue()
      |            ^
a.cc:116:2: error: expected ';' after class definition
  116 | }
      |  ^
      |  ;
a.cc: In constructor 'PriorityQueue::PriorityQueue(int, int)':
a.cc:68:9: error: 'm_list' was not declared in this scope
   68 |         m_list = new List<T>(capacity);
      |         ^~~~~~
a.cc:68:22: error: 'List' does not name a type
   68 |         m_list = new List<T>(capacity);
      |                      ^~~~
a.cc:68:27: error: 'T' was not declared in this scope
   68 |         m_list = new List<T>(capacity);
      |                           ^
a.cc:69:9: error: 'm_compare' was not declared in this scope
   69 |         m_compare = compare;
      |         ^~~~~~~~~
a.cc:69:21: error: 'compare' was not declared in this scope
   69 |         m_compare = compare;
      |                     ^~~~~~~
a.cc: In member function 'int PriorityQueue::Add(int)':
a.cc:74:24: error: 'm_list' was not declared in this scope
   74 |         if (m_count == m_list.Count)
      |                        ^~~~~~
a.cc: In member function 'void PriorityQueue::Swap(int, int)':
a.cc:86:9: error: 'T' was not declared in this scope
   86 |         T tmp = m_list[a];
      |         ^
a.cc:87:9: error: 'm_list' was not declared in this scope
   87 |         m_list[a] = m_list[b];
      |         ^~~~~~
a.cc:88:21: error: 'tmp' was not declared in this scope
   88 |         m_list[b] = tmp;
      |                     ^~~
a.cc: In member function 'void PriorityQueue::Enqueue(int)':
a.cc:96:27: error: 'm_list' was not declared in this scope
   96 |             if (m_compare(m_list[c], m_list[p]) < 0) { Swap(p, c); } else { break; }
      |                           ^~~~~~
a.cc:96:17: error: 'm_compare' was not declared in this scope
   96 |             if (m_compare(m_list[c], m_list[p]) < 0) { Swap(p, c); } else { break; }
      |                 ^~~~~~~~~
a.cc: At global scope:
a.cc:119:5: error: 'string' does not name a type
  119 |     string[] s;
      |     ^~~~~~
a.cc:122:9: error: expected unqualified-id before '[' token
  122 |     char[] cs = new char[] { ' ' };
      |         ^
a.cc:124:11: error: expected ':' before 'Scanner'
  124 |     public Scanner()
      |           ^~~~~~~~
      |           :
a.cc:130:11: error: expected ':' before 'string'
  130 |     public string next()
      |           ^~~~~~~
      |           :
a.cc:130:12: error: 'string' does not name a type
  130 |     public string next()
      |            ^~~~~~
a.cc:141:11: error: expected ':' before 'int'
  141 |     public int nextInt()
      |           ^~~~
      |           :
a.cc:145:11: error: expected ':' before 'int'
  145 |     public int[] ArrayInt(int N, int add = 0)
      |           ^~~~
      |           :
a.cc:145:15: error: expected unqualified-id before '[' token
  145 |     public int[] ArrayInt(int N, int add = 0)
      |               ^
a.cc:155:11: error: expected ':' before 'long'
  155 |     public long nextLong()
      |           ^~~~~
      |           :
a.cc:160:11: error: expected ':' before 'long'
  160 |     public long[] ArrayLong(int N, long add = 0)
      |           ^~~~~
      |           :
a.cc:160:16: error: expected unqualified-id before '[' token
  160 |     public long[] ArrayLong(int N, long add = 0)
      |                ^
a.cc:170:11: error: expected ':' before 'double'