Problem:


Score : 200 points

Problem Statement

Takahashi received otoshidama (New Year's money gifts) from N of his relatives.

You are given N values x_1, x_2, ..., x_N and N strings u_1, u_2, ..., u_N as input. Each string u_i is either JPY or BTC, and x_i and u_i represent the content of the otoshidama from the i-th relative.

For example, if x_1 = 10000 and u_1 = JPY, the otoshidama from the first relative is 10000 Japanese yen; if x_2 = 0.10000000 and u_2 = BTC, the otoshidama from the second relative is 0.1 bitcoins.

If we convert the bitcoins into yen at the rate of 380000.0 JPY per 1.0 BTC, how much are the gifts worth in total?

Constraints

2 \leq N \leq 10

u_i = JPY or BTC.

If u_i = JPY, x_i is an integer such that 1 \leq x_i \leq 10^8.

If u_i = BTC, x_i is a decimal with 8 decimal digits, such that 0.00000001 \leq x_i \leq 100.00000000.

Input

Input is given from Standard Input in the following format:

N
x_1 u_1
x_2 u_2
:
x_N u_N

Output

If the gifts are worth Y yen in total, print the value Y (not necessarily an integer).

Output will be judged correct when the absolute or relative error from the judge's output is at most 10^{-5}.

Sample Input 1

2
10000 JPY
0.10000000 BTC

Sample Output 1

48000.0

The otoshidama from the first relative is 10000 yen. The otoshidama from the second relative is 0.1 bitcoins, which is worth 38000.0 yen if converted at the rate of 380000.0 JPY per 1.0 BTC. The sum of these is 48000.0 yen.

Outputs such as 48000 and 48000.1 will also be judged correct.

Sample Input 2

3
100000000 JPY
100.00000000 BTC
0.00000001 BTC

Sample Output 2

138000000.0038

In this case, outputs such as 138001000 and 1.38e8 will also be judged correct.



Sample input:
2
10000 JPY
0.10000000 BTC


Sample output:
48000.0

Submission status: Runtime Error

Solution code:
n = int(input())
otoshidama = {JPY:0, BTC:0}
for i in range(n):
    a, b = map(str, input().split())
    a = float(a)
    if b == JPY:
        otoshidama[JPY] = otoshidama[JPY] + a
    else:
        otoshidama[BTC] = otoshidama[BTC] + a
ans = otochidama[JPY] + otochidama[BTC] * 380000.0
print(ans)

Submission status: Runtime Error

Solution code:
btc = 380000
N = int(input())
ans = 0
for i in range(N):
    x, u = map(int, input().split())
    if u == "BTC":
        x *= btc
    ans += x
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
ans = 0
for i in range(N):
  x, u = map(int,input().split())
  if u == "BTC":
    ans += float(x)*380000
  else:
    ans += int(x)
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
sum = 0.0
for i in range(N):
    x,u = input().split()
    x = float(x)
    if u = 'BTC':
        x *= 380000.0
    sum += x
print(sum)

Submission status: Runtime Error

Solution code:
N = int(input())
sum = 0
for i in range(N):
    x,u = input().split()
    x = float(x)
    if u = 'BTC':
        x *= 380000.0
    sum += x
print(sum)

Submission status: Runtime Error

Solution code:
N = int(input())
sum = 0
for i in range(N):
    x,u = map(int,input().split())
    if u == 'BTC':
        x = float(x)
        x *= 380000.0
    sum += x
print(sum)

Submission status: Runtime Error

Solution code:
N = int(input())
sum = 0.0
sum = float(sum)
for i in range(N):
    x,u = map(float,input().split())
    if u == 'BTC':
        x *= 380000.0
    sum += x
print(sum)

Submission status: Runtime Error

Solution code:
N = int(input())
sum = 0.0
for i in range(N):
    x,u = map(float,input().split())
    if u == 'BTC':
        x *= 380000.0
    sum += x
print(sum)

Submission status: Runtime Error

Solution code:
N = int(input())
sum = 0.0
for i in range(N):
    x,u = map(int,input().split())
    if u == 'BTC':
        x *= 380000.0
    sum += x
print(sum)

Submission status: Runtime Error

Solution code:
N = int(input())
sum = 0
for i in range(N):
    x,u = map(int,input().split())
    if u == 'BTC':
        x *= 380000.0
    sum += x
print(sum)

Submission status: Runtime Error

Solution code:
N = int(input())
sum = 0
for i in range(N):
    x,u = map(int,input().split())
    if u = 'BTC':
        x *= 380000.0
    sum += x
print(sum)

Submission status: Runtime Error

Solution code:
coin = {}
for _ in range(int(input())):
    x, u = input().split(' ')
    coin[u] = coin.get(u, 0) + float(x)

print(coin['JPY'] + coin['BTC'] * 380000)

Submission status: Runtime Error

Solution code:
#119
n = int(input())
total = 0
for i in range(n):
    x, u = (str(_) for _ in input().split())
    x = int(x)
    if u == "JPY":
        total += x
    else:
        total += 380000.0 * x
print(total)

Submission status: Runtime Error

Solution code:
N = int(input())
cost = [list(map(int, inpu().split())) for i in range(N)]
count = 0

for i in range(N):
  if cost[i][1] == "JPY":
    count += cost[i][0]
  else:
    count += cost[i][0] * 380000.0
    
print(count)

Submission status: Runtime Error

Solution code:
N = input()

A[]
for i in range(N):
  A.append(list(input.split()))
  
ans = 0

for a in A:
  if a[1]=="JPY":
    ans += float(a[0])
    
  else:
    ans += float(a[0])*380000
    
print(ans)

Submission status: Runtime Error

Solution code:

n=int(input())
s=[input().split() for _ in range(n)]
res = 0.0
for v, c in s:
    v = v if c == 'JPY' else v * 380000.0
    res += v
print(res)

Submission status: Runtime Error

Solution code:
N = int(input())

sum = 0.0

for i in range(N):
    x = float(input())
    u = input()

    if u == "JPY":
        sum = sum + x
    else:
        sum = sum + x * 380000

print(sum)

Submission status: Runtime Error

Solution code:
n = int(input())
ans = 0
for _ in range(n):
  x,u = input().split()
  if u == 'BTC':
    x *= 380000
  ans += x

print(ans)

Submission status: Runtime Error

Solution code:
import sys
import math
from collections import deque

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    BTC_TO_YEN = 380000.0
    result = 0.0
    otoshidama = [i.split() for i in inputs]
    for o in otoshidama:
        if o[1] == "BTC":
            result += float(o[0]) * BTC_TO_YEN
        else:
            result += float(o[0])
    return result


def string_to_float(string):
    return list(map(lambda x: float(x), string.split()))


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    [N] = string_to_int(inputs(1))
    ret = solve(inputs(N))
    print(ret)

Submission status: Runtime Error

Solution code:
N = int(input())
ans = 0
for i in range(N):
	val, currency = input().split()
    if currency == 'JPY':
      ans += float(val)
    else:
      ans += float(val) * 380000.0
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
ans = 0
for i in range(N):
	value, currency = input().split()
    if currency == 'JPY':
      ans += float(value)
    else:
      ans += float(value) * 380000.0
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
XU = [list(map(int, input().split())) for i in range(N)]
ans = 0
for i in range(N):
  if XU[i][1] == 'JPN':
    ans += XU[i][0]
  else:
    ans += XU[i][0] * (380000.0)
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
XU = [list(map(int, input().split())) for i in range(N)]
ans = 0
for i in range(N):
  if XU[i][1] == 'JPN':
    ans += XU[i][0]
  else:
    ans += XU[i][0] * 380000.0
print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())
sum=0

for i in range(n):
    value,unit=map(int, input().split())
    if unit == 'BTC':
        sum += value * 380000
    else:
        sum+=value
print(sum)

Submission status: Runtime Error

Solution code:
N = int(input())
sum = 0
for i in range(N):
    x,u = input().split()
    x = float(x)
    if u = "JPY":
        sum += x
    else:
        sum += x*380000.0
print(sum)

Submission status: Runtime Error

Solution code:
n = int(input())
ans = 0
for _ in range(n):
    x, y = map(int, input().split())
    if y == "JPY":
        ans += x
    else:
        ans += 380000
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
ans = 0
for i in range(N):
    x,u = input().split()
    x = float(x)

    if u == 'JPY':
        ans += x
    else:
        ans += (x**380000)
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
x = []
u = []

total = 0
for i in range(n):
    x_tmp, u_tmp = map(int(input))
    if u_tmp == 'JPY':
        total += x_tmp
    elif u_tmp == 'BTC':
        total += x_tmp * 380000

print(total)

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
#'''
allinputs = iter(input().splitlines())
input = lambda : next(allinputs)
#'''
N = int(input())
x, u = [''] * N, [''] * N
ans = 0.0

for i in range(N):
	x[i], u[i] = input().split()
	x[i] = float(x[i])
	if u[i] == 'JPY':
		ans += x[i]
	else:
		ans += x[i] * 380000.0
	
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
total = 0
for i in range(N):
    x,u = input().split()
    if u == "JPY":
        total += int(x)
    else:
        total += int(x)*380000

print(total)

Submission status: Runtime Error

Solution code:
a=int(input())
ans=0
for i in range(a):
  c,d=map(str,input().split())
  if d=="JPY":
    ans+=int(c)
  else:
    ans+=float(int(c)*380000)
print(ans)

Submission status: Runtime Error

Solution code:
a=int(input())
ans=0
for i in range(a):
  c,d=map(str,input().split())
  if d=="JPY":
    ans+=int(c)
  else:
    ans+=float(c*380000)
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
sum = 0
for _ in range(n):
  a,b = input().split()
  aa = int(a)
  if b == 'JPY':
    bb = 1
  else:
    bb = 380000.0
  sum += aa*bb
print(sum)

Submission status: Runtime Error

Solution code:
N = int(input())
res = 0
while N > 0:
  x,u = map(int, input().split())
  res += x if u == 'JPY' else x*380000
  
  N -= 1
print(res)

Submission status: Runtime Error

Solution code:
N=int(input())
for i in range(N):
  l=list(input().split)
print(l)

Submission status: Runtime Error

Solution code:
N = int(input())
xu = [[] for i in range(N)]
otoshidama = 0
for i in range(N):
    xu[i] = list(input().split())
for i in xu:
    if i[1] == 'JPY':
        otoshidama += int(i[0])
    else:
        otoshidama +=

Submission status: Runtime Error

Solution code:
 N = int(input())

 ans = 0
 for i in range(N):
   x,u=map(str, input().split())
   if u == "JPY":
     ans += float(x)
   else:
     ans += float(x) * 380000.0

 print(ans)

Submission status: Runtime Error

Solution code:
n=int(input(n))
amt=0
for i in range(n):
  x,y =input().split()
  if y=="JPY":
    amt+=float(x)
  else:
    amt+=float(x)*380000.0
print(amt)

Submission status: Runtime Error

Solution code:
x = [i for i in input().rsplit(1)]
money = []
unit = []
for i in x[1:]:
    m, u = i.split()
    money.append(float(m))
    unit.append(u)

total = 0.0
for m, u in zip(money, unit):
    if u == 'JPY':
        total += m
    else:
        total += 380000.0*m

print(total)

Submission status: Runtime Error

Solution code:
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


# aとbの最大公約数
def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


# aとbの最小公倍数
def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


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

    print(f"{ans:6f}")


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
n = int(input())
ans = 0.0
for _ in range(n):
  x, u = input.split()
  if u == 'JPN':
    ans += int(x)
  else:
    ans += float(x) * 38000.0

print("{:.8f}".format(ans))

Submission status: Runtime Error

Solution code:
n = int(input())
money = 0
for i in range(n):
	x,u = input().split()
	if u = 'JPY':
		money += int(x)
	else:
		money += int(x)*10000
print(money)

Submission status: Runtime Error

Solution code:
x = []
u = []
Y = 0
for i in range(N):
    str = input().split(' ')
    x[i] = int(str[0])
    u[i] = int(str[1])
    if u[i] == 'JPY':
        Y += x[i]
    else:
        Y += x[i] * 380000.0
print(Y)

Submission status: Runtime Error

Solution code:
N = int(input())
ans = 0
for i in range(N):
  x,v = map(int,input().split())
  if v == "JPY":
    ans += x
  else:
    ans += x*380000.0
print(ans)

Submission status: Runtime Error

Solution code:
a = int(input())

btc = 0
yen = 0

for i in range(a):
    a = input().split()
    if a[1] == 'BTC':
        btc += float(a[0])
    else:
        yen += int(a[0])

btc = btc * 380000

print(float(btc + yen))3

Submission status: Runtime Error

Solution code:
import sys


def input():
    return sys.stdin.readline()[:-1]

# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}
# b = list(map(lambda x: math.ceil(x/10)*10, a))


n = int(input())
ans = 0
for _ in range(n):
    x, u == map(str, input().split())
    if u == "JPY":
        ans += int(x)
    else:
        ans += int(x)*380000.0
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
money = []
tuka = []
for i in range(n):
  li = input().split()
  money.append(int(li[0]))
  tuka.append(li[1])
  
ans = 0
for j in range(n):
  if tuka[j] == "JPY":
    ans += money[j]
  else:
    ans += 380000 * money[j]
print(ans)

Submission status: Runtime Error

Solution code:
import numpy as np
n = int(input())
x = [0] * n
u = ['string'] * n
for j in range(n):
    x[j], u[j] = input().split()
for j in range(n):
    if u[j] == 'JPY':
        x[j] = 1
    elif u[j] == 'BIT':
        x[j] = float(x[j]) * 38
print(np.sum(x) * 10000)

Submission status: Runtime Error

Solution code:
a = int(input())
A=[]
for i in range(a):
  array = input().split(' ')
  A.append(array)

sum=0
for j in A:
  if j[1]=='JPY':
    sum += int(j[0])
  else:
    sum += int(j[0])*380000
print(sum)

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <cstdio>

int main() {
    double btc;
    double jpy;
    int n;
    std::cin >> n;
    for (int i = 0; i < n; ++i) {
        double x;
        std::string y;
        std::cin >> x >> y;
        if (y == "JPY") {
            jpy += x;
        }
        else {
            btc += (x * 380000);
        }
    }
    double ans = jpy + btc;
    printf("%.3lf\n", ans);
}

Submission status: Runtime Error

Solution code:
def main():
    times = int(input())
    btc = 0
    jpy = 0
    for v in range(times):
        j = list(input().split())
        if j[1] =="JPY":
            jpy += int(j[0])
        else:
            btc += (float(j[0] * 38000))
    print(jpy+btc)
main()

Submission status: Runtime Error

Solution code:
n = int(input())
v = [int(i) for i in input().split()]
c = [int(i) for i in input().split()]
count = 0
for x in range(n):
 if v[x] > c[x]:
  count = count + v[x] - c[x]
print(count)

Submission status: Runtime Error

Solution code:
# coding: utf-8

def main():
    N = int(input())
    btc_to_jpy = 380000.0
    ans = 0
    for i in range(N):
        temp_value,unit = input().split()
        value = int(temp_value)
        if unit == "BTC":
            value *= btc_to_jpy
        ans += value
    print(ans)

if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
# coding: utf-8

def main():
    N = int(input())
    btc_to_jpy = 380000.0
    ans = 0
    for i in range(N):
        value,unit = map(int,input().split())
        if unit == "BTC":
            value *= btc_to_jpy
        ans += value
    print(ans)

if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
n=int(input())
a=[]
sum=0
for i in range(n):
  a.append(list(map(int,input().split())))
  if a[i][1]=="BTC":
    sum+=a[i][0]*380000.0
  else:
    sum+=a[i][0]
print(sum)

Submission status: Runtime Error

Solution code:
N = int(input())
res = 0
for i in range(N):
  x, y = input().split()
  if y == 'JPY':
    res += int(x)
  else:
    res += int(x) * 380000
    
print(res)

Submission status: Runtime Error

Solution code:
amo = []
ybt = []
 
n = int(input())
for i in range(n):
  a, y = map(input().split())
  amo.append(a)
  ybt.append(y)
  
sum = 0
for i in range(n):
  if ybt[i] == "JPY":
    sum = sum + float(amo[i])
  else:
    sum = sum + float(amo[i])* 380000
    
print(sum)

Submission status: Runtime Error

Solution code:
amo = []
ybt = []
 
n = int(input())
for i in range(n):
  a, y = map(str, input().split())
  amo.append(a)
  ybt.append(y)
  
float sum = 0
for i in range(n):
  if ybt[i] == "JPY":
    sum = sum + float(amo[i])
  else:
    sum = sum + float(amo[i])* 380000
    
print(sum)

Submission status: Runtime Error

Solution code:
amo = []
ybt = []
 
n = int(input())
for in range(n):
  a, y = map(str, input().split())
  amo.append(a)
  ybt.append(y)
  
float sum = 0
for i in range(n):
  if ybt[i] == "JPY":
    sum = sum + float(amo[i])
  else:
    sum = sum + float(amo[i])* 380000
    
print(sum)

Submission status: Runtime Error

Solution code:
amo = []
ybt = []

n = int(input())
for in range(n):
  a, y = map(str, input().split())
  amo.append(a)
  ybt.append(y)

sum = 0
for i in range(n):
  if ybt[i] == "JPY":
    sum = sum + float(amo[i])
  else:
    sum = sum + float(amo[i])* 380000
    
print(sum)

Submission status: Runtime Error

Solution code:
import numpy as np
N = int(input())
x = [0]*N
u = [0]*N
for i in range(N):
    x[i], u[i]= map(input().split())

Submission status: Runtime Error

Solution code:
import numpy as np
N = int(input())
x = [0]*N
u = [0]*N
for i in range(N):
    x[i], u[i]= map(input().split())
    
x_int = [float(j) for j in x]

Submission status: Runtime Error

Solution code:
import numpy as np
N = int(input())
x = [0]*N
u = [0]*N
for i in range(N):
    x[i], u[i]= map(input().split())
    
x_int = [float(j) for j in x]
u_replace = [1 if k =="JPY" else 380000.0 for k in u]

Submission status: Runtime Error

Solution code:
import numpy as np
N = int(input())
x = [0]*N
u = [0]*N
for i in range(N):
    x[i], u[i]= map(input().split())
    
x_int = [float(j) for j in x]
u_replace = [1 if k =="JPY" else 380000.0 for k in u]

x_arr = np.array(x_int)
u_arr = np.array(u_replace).reshape(N, 1)

Submission status: Runtime Error

Solution code:
import numpy as np
N = int(input())
x = [0]*N
u = [0]*N
for i in range(N):
    x[i], u[i]= map(input().split())
    
x_int = [float(j) for j in x]
u_replace = [1 if k =="JPY" else 380000.0 for k in u]

x_arr = np.array(x_int)
u_arr = np.array(u_replace).reshape(N, 1)

ans = np.dot(x_arr, u_arr)
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
x = [0] * N
u = [0] * N
ans = 0

for i in range(N):
    x[i], u[i] = map(float, input().split())
    
    if u[i] == 'BTC':
        ans += x[i] * 380000
    else:
        ans += x[i]

print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
for _ in range(n):
    x,u = map(int,input().split())
c = 0    
for i in range(n):
    if u[i] == "JPY":
        c += x[i]
    else:
        c += x[i]*380000.0
print(int(c))

Submission status: Runtime Error

Solution code:
n = int(input())
for _ in range(n):
    x,u = map(int,input().split())
c = 0    
for i in range(n):
    if u[i] == "JPY":
        c += x[i]
    else:
        c += x[i]*380000.0
print(c)

Submission status: Runtime Error

Solution code:
N = int(input())
ans = 0
for i in range(N):
    x, u = map(str,input())
    x = float(x)
    if u == 'JPY':
        ans += x
    else:
        ans += x*380000

print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
ans = 0
for i in range(N):
    x, u = str(int,input())
    x = float(x)
    if u == 'JPY':
        ans += x
    else:
        ans += x*380000

print(ans)

Submission status: Runtime Error

Solution code:
package main

import "fmt"

func main() {
    var n int
    fmt.Scan(&n)

    ans := 0.0
    for i := 0; i < n; i++ {
        var (
            x float64
            u string
        )
        fmt.Scan(&x, &u)
        if u == "BTC" {
          ans += x * 380000.0
        } else {
          ans += x
        }
    }
    fmt.Println(ans)
}

Submission status: Runtime Error

Solution code:
n = int(input())
sum_money = 0
for i in range(n):
  x,u = map(input())
  int_x = float(x)
  
  if u == 'BTC':
    int_x *= 380000.0
  sum_money += int_x
print(sum_money)

Submission status: Runtime Error

Solution code:
a = 0
for i in range(int(input())):
  v,u = input().split()
  if u == "JPY":
    a += int(v)
  else:
    a += int(v)*380000
print(a)

Submission status: Runtime Error

Solution code:
n = int(input())
sum = 0
for _ in range(n):
  x,u = input().split()
  if str(u) = "BTC":
    sum += int(x) * 380000.0
  else:
    sum += int(x)
print(sum)

Submission status: Runtime Error

Solution code:
num=int(input())
res=0
for i in range(num):
  t=input().split()
  if t[1]=='BTC':
    t[0]=int(t[0])*380000
  res+=int(t[0])
print(res)

Submission status: Runtime Error

Solution code:
N=int(input())
X=[]
U=[]
for i in range(N):
    x,u=input().split()
    X.append(float(x))
    U.append(u)
    if U[i]=='BTC':
        X[i]=380000*x
print(sum(X))

Submission status: Runtime Error

Solution code:
N=int(input())
X=[]
U=[]
for i in range(N):
    x,u=input().split()
    X.append(int(x))
    U.append(u)
    if u=='BTC':
        X[i]=380000*x
print(sum(X))

Submission status: Runtime Error

Solution code:
N = int(input())
ans = 0

for i in range(N):
  a,b = map(str, input().split())
  if b =="JPY":
    ans += int(a)
  else:
    ans += int(a)*380000
print(ans)

Submission status: Runtime Error

Solution code:
N = input()
ans = 0

for i in range(N):
  a,b = map(float, input().split())
  if b =="JPY":
    ans += a
  else:
    ans += a*380000
print(ans)

Submission status: Runtime Error

Solution code:
N=int(input())
btc=380000
ans=0
for i in range(N):
  x,u=map(str,input().split())
  x = int(x)
  if u=='BTC':
    x *= btc
  ans += x
print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())
money=0

for i in range(n):
    gt=input().split()
    if gt[1]=="BTC":
        money+=float(g[0])*380000
    else:
        money+=float(g[0])

print(money)

Submission status: Runtime Error

Solution code:
N=int(input())
ans=0
for i in range(N):
    x=int(input())
    u=input()
    if(u=="JPY"):
        ans+=x
    else :
        ans+=int(x*380000)
print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())
z=0
for i in range(n):
  a,b=input().split()
  if b=="BTC":
    z += a*380000
  else:
    z += a
print(z)

Submission status: Runtime Error

Solution code:
n=int(input())
z=0
for i in range(n):
  a,b=intput().split()
  if b=="BTC":
    z += a*380000
  else:
    z += a
print(z)

Submission status: Runtime Error

Solution code:
n=int(input())
z=0
for i in range(n):
  a,b=intput().split()
  a=float(a)
  z += a*380000 if b=="BTC" else a
print(z)

Submission status: Runtime Error

Solution code:
n=input()
z=0
for i in range(n):
  a,b=intput().split()
  z+=a*380000 if b=="BTC" else a
print(z)

Submission status: Runtime Error

Solution code:
N = int(input())
total = 0
for i in range(N):
  a,b = map(int(input()))
  if b = "JPY":
    total += a
  else:
    total += a * 380000
print(total)

Submission status: Runtime Error

Solution code:
cnt = 0
for i in range(n):
    x, u = input().split()
    cnt += float(x) * (1 if u == 'JPY' else 380000)
print(cnt)

Submission status: Runtime Error

Solution code:
many = int(input())
sum_money = 0
for i in range(many):
    money, currency = map(str, input().split())
    if currency == 'JPY':
        sum_money += int(money)
    elif currency == 'BTC':
        sum_money += float(380000 * money)
    else:
        print("Error")
print(sum_money)

Submission status: Runtime Error

Solution code:
n = int(input())
ans = 0
for i in range(n):
  a,b =  input().split()
  a = double(a)
  if b == "BTC":
    a = 380000.0 * a 
  ans += a 
print(a)

Submission status: Runtime Error

Solution code:
N = int(input())
x = []
u = []
sum = 0
for i in N:
    x[i] = int(input())
    u[i] = input()
    if u[i] == "BTC":
        sum += x[i] * 380000.0
    else: 
        sum += x[i]
print(sum)

Submission status: Runtime Error

Solution code:
N=int(input())
otoshidama=0
for _ in range(N):
    x,u=input().split()
    x=int(x)
    if u=="JPY":
        otoshidama+=x
    else:
        otoshidama+=x*380000.0
print(otoshidama)

Submission status: Runtime Error

Solution code:
def main():
    N = int(input())
    sum = 0
    for i in range(N):
        x,y = (int(_) for _ input().split())
        if y == 'JPY':
            sum += x
        elif y == 'BTC':
            sum += x * 380000.0
    print(sum)

if __name__  == '__main__':
    main()

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3

N = float(input())

data = []

for i in range(N):
    price = input().split()
    data.append(price) 

total = 0

for i in range(N):
    if data[i][1] == "JPY":
        total += int(data[i][0])
    elif data[i][1] == "BTC":
        total += 380000 * float(data[i][0])

print(total)

Submission status: Runtime Error

Solution code:
N=int(input())
ans=0

for i in range(N):
  x,u=input().split()
  if u=='BTC':
    ans+=x*380000
  else:
    ans+=x

print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
ans = 0
for i in range(N):
  a, b = input().split()
  if b == 'JPY':
    ans += int(a)
  else:
    ans += int(a)*380000
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
ans = 0
for i in range(N):
  a, b = input().split()
  if b = 'JPY':
    ans += int(a)
  else:
    ans += int(a)*380000
print(ans)

Submission status: Runtime Error

Solution code:
n,ans=int(input()),0
for i in range(n):
  a,b=input().split();a=int(a)
  if b=="JPY":ans+=a
  else:ans+=a*380000
print(ans)

Submission status: Runtime Error

Solution code:
n,ans=int(input()),0
for i in range(n):
  a,b=map(int,input().split())
  if b=="JPY":ans+=a
  else:ans+=a*380000
print(ans)

Submission status: Runtime Error

Solution code:
rate = 380000
N = int(input())

total = 0
for i in range(N):
    x,u = input()
    val = int(x)
    if u=='BTC':
        val *= rate
    total += val
print(total)

Submission status: Runtime Error

Solution code:
N = int(input())
total = 0
for _ in range(N):
  x, u = input().split()
  i = int(x)
  if u == "JPY":
    tptal += i
  else:
    total += i*380000
print(total)

Submission status: Runtime Error

Solution code:
N = int(input())
total = 0
for _ in range(N):
  x, u = input().split()
  i = int(x)
  if u == "JPY":
    tptal += i
  else:
    total += i*380000.0
print(total)

Submission status: Runtime Error

Solution code:
N = int(input())
sum = 0
for i in range(N):
	x, u = input().split()
	if u = "BTC":
		sum += int(x) * 380000
	else:
		sum += int(x)

print(sum)

Submission status: Runtime Error

Solution code:
N=int(input())
a=[]
b=[]
for i in range(N):
  x,y=input().split()
  a=a.append(float(x))
  b=b.append(y)
total=0
for j in range(N):
  if b[j]=='JPY':
    total = total+ a[j]
  else:
    total = total+380000.0*a[j]
print(total)

Submission status: Runtime Error

Solution code:
N=int(input())
a=[]
b=[]
for i in range(N):
  a=a.append(float(input().split()))
  b=b.append(input().split())
total=0
for j in range(N):
  if b[j]=='JPY':
    total = total+ a[j]
  else:
    total = total+380000.0*a[j]
print(total)

Submission status: Runtime Error

Solution code:
N=int(input())
a=[]
b=[]
for i in range(N):
  a=a.append(float(input()))
  b=b.append(input())
total=0
for j in range(N):
  if b[j]=='JPY':
    total = total+ a[j]
  else:
    total = total+380000.0*a[j]
print(total)

Submission status: Runtime Error

Solution code:
N=int(input())
a=[0]*N
b=['z']*N
for i in range(N):
  a[i]=float(input().split())
  b[i]=input().split()
total=0
for j in range(N):
  if b[j]='JPY':
    total = total+ a[j]
  else:
    total = total+380000.0*a[j]
print(total)

Submission status: Runtime Error

Solution code:
N=int(input())
a=[0]*N
b=[0]*N
for i in range(N):
  a[i]=float(input().split())
  b[i]=input().split()
total=0
for j in range(N):
  if b[j]='JPY':
    total = total+ a[j]
  else:
    total = total+380000.0*a[j]
print(total)

Submission status: Runtime Error

Solution code:
N=int(input())
a=[0]*N
b=[0]*N
for i in range(N):
  a[i]=float(input().split())
  b[i]=input().split
total=0
for j in range(N):
  if b[j]='JPY':
    total = total+ a[j]
  else:
    total = total+380000.0*a[j]
print(total)

Submission status: Runtime Error

Solution code:
N=int(input())
a=[]
b=[]
for i in range(N):
  a=a.append(float(input()))
  b=b.append(input())
total=0
for j in range(N):
  if b[j]='JPY':
    total = total+ a[j]
  else:
    total = total+380000.0*a[j]
print(total)

Submission status: Runtime Error

Solution code:
N=int(input())
a=[]
b=[]
for i in range(N):
  a=a.append(float(input()))
  b=b.append(input())
total=0
j=0
while j<N:
  if b[j]='JPY':
    total = total+ a[j]
  else:
    total = total+380000*a[j]
  j+=1

print(total)

Submission status: Runtime Error

Solution code:
N=int(input())
a=[]
b=[]
for i in range(N):
  a=a.append(float(input()))
  b=b.append(input())
total=0
j=0
while j<N:
  if b[j]='JPY':
    total = total+ a[j]
  else:
    total = total+380000.0*a[j]
  j+=1

print(total)

Submission status: Runtime Error

Solution code:
N=int(input())
a=[]
b=[]
for i in range(N):
  a=a.append(float(input()))
  b=b.append(input())
total=0
j=0
while j<N:
  if b[j]='JPY':
    total = total+ a[j]
  else:
    total = total+380000.0*a[j]

print(total)

Submission status: Runtime Error

Solution code:
N=int(input())
for i in range(N):
  a=float(input().split())
  b=input().split()
total=0
j=0
while j<N:
  if b[j]='JPY':
    total = total+ a[j]
  else:
    total = total+380000.0*a[j]

print(total)

Submission status: Runtime Error

Solution code:
N = int(input())

money = 0
for _ in range(N):
    x, u = map(int, input().split())
    if u == "JPY":
        money += x
    else:
        money += x * 380000
print(money)

Submission status: Runtime Error

Solution code:
N = map(int, input().split())
ans = 0
for i in range(N):
    x, u = input().split()
    if u == 'BTC':
        ans += float(x)*380000.0
    else:
        ans += float(x)
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
 
otoshidamas = []
kingaku = 0
for i in range(n):
  otoshidamas.append(input().split())
  
for item in otoshidamas:
  if otoshidamas[1] == "JPY":
    kingaku += float(otoshidamas[0])
  else:
    kingaku += float(otoshidamas[0]) * 380000.0
 
print(kingaku)

Submission status: Runtime Error

Solution code:
n = int(input())

otoshidamas = []
kingaku = 0
for i in range(n):
  otoshidamas.append([float(item) for item in input()])
  
for item in otoshidamas:
  if otoshidamas[1] == "JPY":
    kingaku += otoshidamas[0]
  else:
    kingaku += otoshidamas[0] * 380000.0

print(kingaku)

Submission status: Runtime Error

Solution code:
v
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

N = int(input())

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