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:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

N = int(input())

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

Submission status: Runtime Error

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

N = int(input())

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



print(answer)

Submission status: Runtime Error

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

N = int(input())
xls = []
uls = []
answer = 0
for _ in range(N):
    x,u = input().split()
    if u == JPY:
        money = int(x) 
    else:
        money = float(x)*380000
    answer += money



print(answer)

Submission status: Runtime Error

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

N = int(input())
xls = []
uls = []
for _ in range(N):
    x,u = input().split()
    if u == JPY:
        x = int(x)
    else:
        x = float(x)
    xls.append(x)
    uls.append(u)

answer = 0
for i in range(N):
    if uls[i] == JPY:
        money = xls[i]
    else:
        money = xls[i]*380000
    answer += money

print(answer)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#coding:utf-8

if __name__ == "__main__":
    num = int(input())
    money = []
    mtype = []
    for p in range(num):
        m_tmp, mt_tmp = input().split()
        money.append(float(m_tmp))
        mtype.append(mt_tmp)
    
    total = 0
    for m, mt in zip(money, mtype):
        if mt == "JPY":
            total += m
        else:
            total += mt * 380000.0
    
    print(total)

Submission status: Runtime Error

Solution code:
n=int(input())
xu=dict(map(str,input().split()) for i in range(n) )
s=[]
b=[]
for key,val in xu.items():
    if val=="JPY":
        s.append(float(key))
    else:
        b.append(float(key))
print(sum(s)+(sum(b)*380000.0))n=int(input())

Submission status: Runtime Error

Solution code:
n=int(input())
xu=dict(map(str,input().split()) for i in range(n) )
s=[]
b=[]
for key,val in xu.items():
    if val=="JPY":
        s.append(float(key))
    else:
        b.append(float(key))
print(sum(s)+(sum(b)*380000))n=int(input())
xu=dict(map(str,input().split()) for i in range(n) )
s=[]
b=[]
for key,val in xu.items():
    if val=="JPY":
        s.append(int(key))
    else:
        b.append(float(key))
print(sum(s)+(sum(b)*380000.0))

Submission status: Runtime Error

Solution code:
n=int(inout())
jpy,btc=0,0
for i in range(n):
  x,u=input().split()
  if u=="JPY":
    jpy+=int(x)
  else:
    btc+=float(x)
jpy+=btc*380000
print(jpy)

Submission status: Runtime Error

Solution code:
# Input part 
N = int(input())
rateBtcYen =  380000.0 
totalYen = 0
for i in range(0, N):
    amountString, currency = input().split()
    amount = int(amountString)
    if currency == "BTC":
        totalYen += amount*rateBtcYen
    else:
        totalYen += amount
print(totalYen)

Submission status: Runtime Error

Solution code:
size = input()
sum = 0
for i in range(int(size)):
    x = input()
    x = float(x)
    u = input()
    if(u == "BTC"):
        x *= 380000
    sum += x
print(sum)

Submission status: Runtime Error

Solution code:
import sys

z = 0
for line in sys.stdin:
  xs = map(int, line.split())
  if len(xs) < 2:
    continue
  if xs[1] == 'BTC':
    z += 380000 * xs[0]
  else: 
    z += xs[0]
print(z)

Submission status: Runtime Error

Solution code:
import sys

z = 0
for line in sys.stdin:
  xs = [float(x) for x in line.split()]
  if len(xs) == 1: 
    continue
  z += 380000 * xs[0] if xs[1] == 'BTC' else xs[0]
print(z)

Submission status: Runtime Error

Solution code:
import sys

z = 0
for line in sys.stdin:
  xs = map(int, line.split())
  if len(xs) == 1: continue
  z += 380000 * xs[0] if xs[1] == 'BTC' else xs[0]
print(z)

Submission status: Runtime Error

Solution code:
N = int(input())

answer=0
for _ in range(N):
    money_str, unit = input().split()
    money = float(money)
    if unit == "BTC":
        money *= 380000
    answer += money

print(answer)

Submission status: Runtime Error

Solution code:
N = int(input())

sumOtoshidama = 0
for _ in range(N):
    amountStr, unit = input().split()
    amount = int(amountStr)
    if unit == "BTC":
        amount *= 380000
    sumOtoshidama += amount

print(sumOtoshidama)

Submission status: Runtime Error

Solution code:
n = int(input())
a = []
a.append([0,0])
for i in range(n):
    in1, in2 = map(float, input().split())
    a.append([in1,in2])

ans = 0

for i in range(n):
    if a[i][1] == 'BTC':
        ans += a[i][0]*380000
    else :
        ans += a[i][0]
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
sum = 0
for i in range N:
  X = input().split()
  if X[1] == 'JPY':
    sum += float(X[0])
  else:
  	sum += float(X[0])*380000
print(sum)

Submission status: Runtime Error

Solution code:
N = int(input())
sum = 0
for i in N:
  X = input().split()
  if X[1] == 'JPY':
    sum += float(X[0])
  else:
  	sum += float(X[0])*380000
print(sum)

Submission status: Runtime Error

Solution code:
from sys import stdin

N = int(input())
sum = 0
for i in N:
  X = input().split()
  if x[1] == 'JPY':
    sum += float(x[1])
  else:
  	sum += float(x)*380000
print(sum)

Submission status: Runtime Error

Solution code:
from sys import stdin

N = int(input())
sum = 0
for i in N:
  x,u = stdin.readline().rstrip().split()
  if u == 'JPY':
    sum += int(x)
  else:
  	sum += float(x)*380000
print(sum)

Submission status: Runtime Error

Solution code:
from sys import stdin

N = int(input())
sum = 0
for i in N:
  x,u = stdin.readline().rstrip().split()
  if u == 'JPY':
    sum += int(x)
  else:
  	sum += float(x)*38000
print(sum)

Submission status: Runtime Error

Solution code:
N = int(input())
sum = 0
for i in N:
  x,u = stdin.readline().rstrip().split()
  if u == 'JPY':
    sum += int(x)
  else:
  	sum += float(x)*38000
print(sum)

Submission status: Runtime Error

Solution code:
N = input()
sum = 0
for i in N:
  x,u = stdin.readline().rstrip().split()
  if u == 'JPY':
    sum += int(x)
  else:
  	sum += float(x)*38000
print(sum)

Submission status: Runtime Error

Solution code:
n=int(input())
sum=0
for i in range(0,n):
        x=float(input())
        y=str(input())
        if(y=='JPY'):
                sum=sum+x
        else:
                z=x*380000.0
                sum=sum+z
print(sum)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

for i in range(num):
  a,b = input().split(" ")
  if b == "JPY":
    a = int(a)
    sum += a
  
  else:
    a = int(a)
    c = a * 380000
    sum += c
   
print(sum)

Submission status: Runtime Error

Solution code:
import numpy as np

N = input()
input = [input() for i in range(N)]

temp = []
for s in input:
  v, k = s.split()
  if k == "BTC":
    temp.append(float(v)*380000)
  else:
    temp.append(float(v))

print(sum(temp))

Submission status: Runtime Error

Solution code:
n=int(input())
for i in range(n):
  m, curr=map(float, input().split())
  a=0
  if curr='BTC'
    a=a+m/380000
  else:
    a=a+m
print(a)

Submission status: Runtime Error

Solution code:
N = input()
X = []
U = []
for i in range(N):
    (x, u) = int(input().split())
    X[i] = x
    U[i] = u

otoshidama = 0.0

for i in range(N):
    if U[i] == "JPY":
        otoshidama += X[i]
    elif U[i] == "BTC":
        otoshidama += X[i] * 380000.0

print(otoshidama)

Submission status: Runtime Error

Solution code:
N = int(input())
all_yen = 0
for n in range(N):
    x , u = input().split()
    if u  == 'BTC':
        x *= 380000.0

    all_yen += x

Submission status: Runtime Error

Solution code:
n = input()
sum = 0
for i in range(n):
  amount, name = input().split()
  amount = float(amount)
  if name == "BTC":
    sum += amount * 380000
  else:
    sum += amount
    
print(sum)

Submission status: Runtime Error

Solution code:
n=int(input())
ans=0.0
for i in range(n):
  a=list(input().split())
  if a[1] is "JPY":
    ans += int(a[0])
  else:
    ans += int(a[0])*380000
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
money, tanni = input().split()
money = float(money)
total = 0.0
rate = 380000.0
for i in range(N)
    if tanni == "JPY":
        total += money
    else:
        total += money * rate
print("%.11f"%(total))

Submission status: Runtime Error

Solution code:
n = int(input())
ans = 0.0
for i in range(n):
  a, c = input().split()
  a = int(a)
  if c == 'JPY':
    ans += a
  else:
    ans += a * 380000.0
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
sumv = 0
for idx in n:
  v, u = str(input()).split(' ')
  if u == 'JPY':
    sumv += float(int(v))
  elif u == 'BTC':
    sumv += float(v) * 380000.0
print(sumv)

Submission status: Runtime Error

Solution code:
N = int(input())
M = [[int(i) for i in input().split()] for i in range(N)]
C = 0

for i in range(N):
    if A[i][1] == 'JPY':
        C += M[i][0]
    elif A[i][1] == 'BTC':
        C += M[i][0]*380000

print(C)

Submission status: Runtime Error

Solution code:
N = int(input())
total = 0
for i in range(N):
    money, tani = map(input().split())
    money = int(input())
    if tani = "JPY":
        total += money
    else:
        total += money * 380000
print("%d"%(total))

Submission status: Runtime Error

Solution code:
n=int(input())
yr_m=[]
sum_m=0
for i in range(n):
  yr_m.append(list(map(float,str,input().split())))
 
  
for j in range(n):
  if yr_m[j][1]=="BTC":
    yr_m[j][0]=yr_m[j][0]*380000.0
  sum_m=sum_m+yr_m[j][0]
 
print(sum_m)

Submission status: Runtime Error

Solution code:
n=int(input())
yr_m=[]
sum_m=0
for i in range(n):
  yr_m.append(list(map(float,input().split())))

  
for j in range(n):
  if yr_m[j][1]=="BTC":
    yr_m[j][0]=yr_m[j][0]*380000.0
  sum_m=sum_m+yr_m[j][0]

print(sum_m)

Submission status: Runtime Error

Solution code:
n = int(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[1])
    else:
        ans += float(a[0]) * 380000.0
print(ans)

Submission status: Runtime Error

Solution code:
n = int(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[1])
    else:
        ans += float(a[0]) * 380000.0
print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())
sub=dict()
for _ in range(n):
  x,u=input().split()
  if u in sub:
    sub[u]+=x
  else:
    sub[u]=x
print(float(sub["JPY"])+float(sub["BTC"])*380000.0)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = input()

h, w = (input().split() for in range(n))
a=0

if w =="JPY":
  a += h
else:
  a += h * 380000.0

print(a)

Submission status: Runtime Error

Solution code:
n = int(input())
f = 0
k = 0
for i in range(n) :
    a = input().split("")[1] == "JPY"
    if a[1] == "JPY" :
        f +=  int(a[0])
    else :
        k += int(a[0])
print(f + k *380000 )

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
a = int(input())
total = 0
for _ in range(a):
    i = input()
    v,c = i.split()
    v = int(v)
    if(c=="BTC"):
        v *= 380000
    total += v
print(total)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = int(input())
total = 0
for i in range(a):
    v,c = i.split()[0]
    v = int(v)
    if(c=="BTC"):
        v *= 380000
    total += v
print(total)

Submission status: Runtime Error

Solution code:
n,*a=open(0).read().split();f=float;;print(sum([f(a[s])*380000,f(a[s])][a[s+1]=="JPY"]for s in range(0,int(n)*2,2)))

Submission status: Runtime Error

Solution code:
a=int(input())
b=0
for i in range(a):
  c=input().split()
  if c[1]=='BTC':
    b+=((float)c[0])*380000.0
  else:
    b+=(float)c[0]
print(b)

Submission status: Runtime Error

Solution code:
a=int(input())
b=0
for i in range(a):
  c=input().split()
  if c[1]=='BTC':
    b+=(float)c[0]*380000.0
  else:
    b+=(float)c[0]
print(b)

Submission status: Runtime Error

Solution code:
a=int(input())
b=0
for i in range(a):
  c=input().split()
  if c[1]='BTC':
    b+=(float)c[0]*380000.0
  else:
    b+=(float)c[0]
print(b)

Submission status: Runtime Error

Solution code:
a = int(input())

b = []

for i in range(a):
    b.append(input().split())

res = 0

for i in b:
    if (i[1] == 'BTC'):
        res += int(i[0])*380000
    else:
        res += int(i[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)

ans = 0
for i in range(N):
    if u == 'BTC':
        ans += x * 380000
    else:
        ans += x
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
X, U = [], []
for i in range(N):
    x, u = map(int, input().split(" "))
    X.append(x)
    U.append(u)

ans = 0
for i in range(N):
    if u == 'BTC':
        ans += x * 380000
    else:
        ans += x
print(ans)

Submission status: Runtime Error

Solution code:
a = int(input())

b = []

for i in range(a):
    b.append((input().split()))

res = 0

for i in b:
    if (i[1] == 'BTC'):
        res += i[0]*380000
    else:
        res += i[0]

print(res)

Submission status: Runtime Error

Solution code:
a = int(input())

b = []

for i in range(a-1):
    b.append((input().split()))

res = 0

for i in b:
    if (i[1] == 'BTC'):
        res += i[0]*380000
    else:
        res += i[0]

print(res)

Submission status: Runtime Error

Solution code:
a=input()

#n=int(a.split()[0])
c=0
for i in range(1,int(a.split()[0])+1):
    if str(a.split()[2*i])=='JPY':
        c=c+int(a.split()[2*i-1])
    else:
        c=c+ int(380000) * float(a.split()[2*i-1])
print(c)

Submission status: Runtime Error

Solution code:
a = int(input())

b = []

for i in range(a-1):
    b.append((input().split())

res = 0

for i in b:
    if (i[1] == 'BTC'):
        res += i[0]*380000
    else:
        res += i[0]

print(res)

Submission status: Runtime Error

Solution code:
a=input()

n=int(a.split()[0])
c=0
for i in range(1,n+1):
    if str(a.split()[2*i])=='JPY':
        c=c+int(a.split()[2*i-1])
    else:
        c=c+ int(380000) * float(a.split()[2*i-1])
print(c)

Submission status: Runtime Error

Solution code:
a = int(input())

b = []

for i in a-1:
    b.append((input().split())

res = 0

for i in b:
    if (i[1] == 'BTC'):
        res += i[0]*380000
    else:
        res += i[0]

print(res)

Submission status: Runtime Error

Solution code:
a = int(input())

b = []

for i in a:
    b.append((input().split())

res = 0

for i in b:
    if (i[1] == 'BTC'):
        res += i[0]*380000
    else:
        res += i[0]

print(res)

Submission status: Runtime Error

Solution code:

n = int(input())

xlist=[]
sum=0
for i in range(n):
    xlist.append(input().split())
    if xlist[i][1] == "BTC":
        sum = sum + int(xlist[i][0])*380000
    else:
        sum = sum + int(xlist[i][0])

print(sum)

Submission status: Runtime Error

Solution code:
a = int(input())

b = []

for i in a:
    b.append(list(input().split())

res = 0

for i in b:
    if (i[1] == 'BTC'):
        res += i[0]*380000
    else:
        res += i[0]

print(res)

Submission status: Runtime Error

Solution code:
a = int(input())

b = []

for i in a:
    b.append(list(input().split())

res = 0

for i in b:
    if (b[1] == 'BTC'):
        res += i[0]*380000
    else:
        res += i[0]

print(res)

Submission status: Runtime Error

Solution code:
n = int(input())
x = [input().split() for i in range(n)]
ans = 0.0
for row in x:
  if row[1] == 'JPY':
    ans += float(row[0])
  else:
    ans += float(row[1]) * 380000
print(ans)

Submission status: Runtime Error

Solution code:
import numpy as np

N = int(input())
a = []
for i in range(N):
    a.append(input())
b = []
for i in range(N):
    b.append(input())
for i in a:
  if i == BTC:
    c.append(380000)
  else:
    c.append(1)
print(b*c)

Submission status: Runtime Error

Solution code:
n = int(input())
x = [input().split() for i in range(n)]
ans = 0.0
for row in x:
  if row[1] == 'JPY'
    ans += float(row[0])
  else:
    ans += float(row[1]) * 380000
print(ans)

Submission status: Runtime Error

Solution code:
import numpy as np

N = int(input())
a = []
for i in range(N):
    a.append(input())
b = []
for i in range(N):
    b.append(input())
for i in a:
  if i == BTC:
    c.append(380000.0)
  else:
    c.append(1.0)
print(b*c)

Submission status: Runtime Error

Solution code:
a = int(input())

b = []

for i in a:
    b.append(input().split())

res = 0

num = a.pop(0) * 2

for i in len(b):
    if (b[i] == 'BTC'):
        c = int(a[i-1]) * 380000
        res += c
    elif (b[i] == 'JPY'):
        res += int(b[i-1])
    else:
        pass

print(res)

Submission status: Runtime Error

Solution code:
n = int(input())
e = [[str(i) for i in input().split()] for i in range(n)]

e = e.replace("JPN","1")
e = e.replace("BTC","380000")
e = froat('e')

print reduce(lambda x, y: x * y,e)
s = sum('e')
print('s')

Submission status: Runtime Error

Solution code:
a = int(input())

b = []

for i in a:
    b.append(input().split())

res = 0

num = a.pop(0) * 2

for i in range(b):
    if (b[i] == 'BTC'):
        c = int(a[i-1]) * 380000
        res += c
    elif (b[i] == 'JPY'):
        res += int(b[i-1])
    else:
        pass

print(res)

Submission status: Runtime Error

Solution code:
n = int(input())
e = [[str(i) for i in input().split()] for i in range(n)]

e = e.replace("JPN","1")
e = e.replace("BTC","380000")
e = froat('e')

print reduce(lambda x, y: x * y,e)
s = sum(e)
print(s)

Submission status: Runtime Error

Solution code:
a = int(input())

b = []

for i in a:
    b.append(input())

res = 0

num = a.pop(0) * 2

for i in range(b):
    if (b[i] == 'BTC'):
        c = int(a[i-1]) * 380000
        res += c
    elif (b[i] == 'JPY'):
        res += int(b[i-1])
    else:
        pass

print(res)

Submission status: Runtime Error

Solution code:


a = int(input())

b = []

for i in a*2:
    b.append(input())

res = 0

num = a.pop(0) * 2

for i in range(b):
    if (b[i] == 'BTC'):
        c = int(a[i-1]) * 380000
        res += c
    elif (b[i] == 'JPY'):
        res += int(b[i-1])
    else:
        pass

print(res)

Submission status: Runtime Error

Solution code:
a = list(input.split())
res = 0

num = a.pop(0) * 2

for i in range(a):
    if (a[i] == 'BTC'):
        b = int(a[i-1]) * 380000
        res += b
    elif (a[i] == 'JPY'):
        res += int(a[i-1])
    else:
        pass

print(res)

Submission status: Runtime Error

Solution code:
a = list(map(string, input.split()))
res = 0

num = a.pop(0) * 2

for i in range(a):
    if (a[i] == 'BTC'):
        b = int(a[i-1]) * 380000
        res += b
    elif (a[i] == 'JPY'):
        res += int(a[i-1])
    else:
        pass

print(res)

Submission status: Runtime Error

Solution code:
N = int(input())

total = 0
for i in range(N):
    a,b = map(str,raw_input().split())
    if b == 'JPY':
        total += float(a)
    elif b == 'BTC':
        total += float(a)*380000

print(total)

Submission status: Runtime Error

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

int main() {
  int N;
  cin >> N;
  
  int result = 0;
  int ix;
  double dx;
  string u;
  string x;
  for (int i = 0; i < N; i++) {
    cin >> x >> u;
    if (u == "JPY") {
      ix = stoi(x);
      result += ix;
    } else {
      dx = stod(x);
      result += dx * 380000.0;
    }
  }
  
  cout << result;
}

Submission status: Runtime Error

Solution code:
a = list(map(int, input.split()))
res = 0

num = a.pop(0) * 2

for i in range(a):
    if (a[i] == 'BTC'):
        b = a[i-1] * 380000
        res += b
    elif (a[i] == 'JPY'):
        res += a[i-1]
    else:
        pass

print(res)

Submission status: Runtime Error

Solution code:
x = []
u = []
x0 = []
for i in range(10):
    x1=[str(j) for j in input().split()]
    y1=[int(i) for i in input().split()]
    x.append(x1)
    u.append(y1)
for cur in x1:
  if cur == 'BTC':
    x0.append(380000.0)
  else:
    x0.append(1.0)    
combined1 = [a * b for (a, b) in zip(x0, u)]

Submission status: Runtime Error

Solution code:
a = list(map(int, input.split()))
res = 0

num = a.pop(0) * 2

for i in range(num):
    if (a[i] == 'BTC'):
        b = a[i-1] * 380000
        res += b
    elif (a[i] == 'JPY'):
        res += a[i-1]
    else:
        pass

print(res)

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double db;
#define pb push_back
#define fr(i,n) for(int i=0;i<n;i++)
#define Fr(i,n) for(int i=0;i++<n;)
#define ifr(i,n) for(int i=n-1;i>=0;i--)
#define iFr(i,n) for(int i=n;i>0;i--)

int main(){
  int n;
  db x,ans=0;
  string s;
  cin>>n;
  fr(i,n){
    cin>>x>>s;
    if(s=="BTC") x*=380000;
    ans+=x;
  }
  printf("%.12f\n",ans);
}

Submission status: Runtime Error

Solution code:
n = int(input())
i = 0
total = 0
while i < n:
  date = input().split()
  m = int(date[0])
  t = date[1]
  if t == "JPY":
    total += m
  else:
    total += m * 380000.0
  i += 1
  
print(total)

Submission status: Runtime Error

Solution code:
a = list(map(int, input.split()))
res = 0

num = a.pop(0) * 2

for i in range(num):
    if (i == 'BTC'):
        b = a[i-1] * 380000
        res += b
    elif (i == 'JPY'):
        res += a[i-1]
    else:
        pass

print(res)

Submission status: Runtime Error

Solution code:

n = int(input())

li = []
for i in range(n):
    li.append(list(input().split()))


for money in li:
    if money[1] == 'JPN':
        continue
    else:
        money[0] = int(money[0]) * 380000.0

sum_money = sum([int(i[0]) for i in li])

print(sum_money)

Submission status: Runtime Error

Solution code:
n = int(input())
i = 0
total = 0
while i < n:
  date = input().split()
  m = int(date[0])
  t = date[1]
  if date[1] == "JPY":
    total += m
  else:
    total += m * 380000
  i += 1
  
print(total)

Submission status: Runtime Error

Solution code:
a = list(map(int, input.split()))
res = 0

num = a.pop(0)

for i in range(num):
    if (i == 'BTC'):
        b = a[i-1] * 380000
        res += b
    else:
        res += a[i-1]

print(res)

Submission status: Runtime Error

Solution code:
n = int(input())
i = 0
total = 0
while i < n:
  date = input().split()
  m = int(date[0])
  t = date[1]
  if date[1] == "JPY":
    total += m
  else:
    total += m *380000.0
  i += 1
  
print(total)

Submission status: Runtime Error

Solution code:
N = int(input())
u = [input().split() for _ in range(N)]

Y=0
for i in range(N):
    if u[i][1]=="JPY":
        Y+=int(u[i][0])
    else:
        Y+=int(u[i][0])*380000

print(Y)

Submission status: Runtime Error

Solution code:
N = int(input())
x = [0] * N
u = [0] * N
for i in range(N):
    u[i],x[i] = map(str, input().split())
    x[i] = float(x[i])

sum = 0

for i in range(N):
    if (u[i] == 'JPY'):
        sum += x[i]
    elif (u[i] == 'BTC'):
        sum += x[i] * 380000
    else:
        break
print(sum)

Submission status: Runtime Error

Solution code:
sum = 0

num = int(input())

if num < 1 or num > 10 :
    return
    
for i in range(num) :
    money, currency = input().split()
    money = double(money)
    if currency == 'JPY' :
        sum += money
    else :
        sum += money * 380000

print(sum)

Submission status: Runtime Error

Solution code:
N = int(input())
u = [input().split() for _ in range(N)]

Y=0
for i in range(N):
    if u[i][1]=="JPY":
        Y+=int(u[i][0])
    else:
        Y+=int(u[i][0]*380000)

print(Y)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
btc = 380000.0
y=0
for i in range(int(input())):
    x, u = input().split()
    x = int(x)
    if u = "BTC":
         y = y + x * btc
    else:
        y = x
print(y)

Submission status: Runtime Error

Solution code:

n = int(input())

li = []
for i in range(n):
    li.append(list(map(float, input().split())))


for money in li:
    if money[1] == 'JPN':
        continue
    else:
        money[0] *= 380000.0

sum_money = sum([i[0] for i in li])

Submission status: Runtime Error

Solution code:
N = int(input())
x = []
u = []
Y = 0
for i in range(N):
    s = [i for i in input().split()]
   	x.append(float(s[0]))
    u.append(s[1])

    if u[i] == 'BTC':
        Y += x[i]*380000
    else:
        Y += x[i]

print(Y)

Submission status: Runtime Error

Solution code:
import sys

n = sys.stdin.readline().rstrip()

sum = 0
for i in range(n):
  line = sys.stdin.readline().rstrip().split(" ")
  if(line[1] == "BTC"):
    sum += float(line[0]) * 380000.0
  else:
    sum += float(line[0])
print(sum)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
btc = 380000.0
y=0
for i in range(int(input())):
    x, u = input().split()
    if u = "BTC":
         y = y + x * btc
    else:
        y = x
print(y)

Submission status: Runtime Error

Solution code:
import sys

n = sys.stdin.readline().rstrip()

sum = 0
for i in range(n):
  line = sys.stdinp.readline().rstrip().split(" ")
  if(line[1] == "BTC"):
    sum += float(line[0]) * 380000.0
  else:
    sum += float(line[0])
print(sum)

Submission status: Runtime Error

Solution code:
sum = 0

num = int(input())

for i in range(num) :
    money, currency = input().split()
    money = int(money)
    if currency == 'JPY' :
        sum += money
    else :
        sum += money * 380000

print(sum)

Submission status: Runtime Error

Solution code:
import sys

n = sys.stdinp.readline().rstrip()

sum = 0
for i in range(n):
  line = sys.stdinp.readline().rstrip().split(" ")
  if(line[1] == "BTC"):
    sum += float(line[0]) * 380000.0
  else:
    sum += float(line[0])
print(sum)

Submission status: Runtime Error

Solution code:
N = int(input())
u = [input().split() for _ in range(N)]

Y=0
for i in range(N):
    if i[i][1]=="JPY":
        Y+=u[i][0]
    else:
        Y+=u[i][0]*380000

print(Y)

Submission status: Runtime Error

Solution code:
N = int(input())
x = [0] * N
u = [0] * N
for i in range(N):
    x[i],u[i] = map(int, input().split())
sum = 0
for i in range(N):
    if (u[i] == 'JPY'):
        sum += x[i]
    elif (u[i] == 'BTC'):
        sum += x[i] * 380000
    else:
        break

Submission status: Runtime Error

Solution code:
N = int(input())
otoshidama = []
otoshidama_sum = 0
for i in range(N):
    otoshidama.append(input().split())
for i in range(N):
    otoshidama[i][0] = int(otoshidama[i][0])
    if otoshidama[i][1] == 'BTC':
        otoshidama[i][0] = otoshidama[i][0]*380000
    otoshidama_sum += otoshidama[i][0]
print(otoshidama_sum)

Submission status: Runtime Error

Solution code:
sum = 0

num = int(input())

for i in range(num) :
    money = int(input())
    currency = input()
    if currency == 'JPY' :
        sum += money
    else :
        sum += money * 380000

print(sum)

Submission status: Runtime Error

Solution code:
def calc(val, unit):
	if unit == 'BTC':
		val *= 380000
	return val

sum41 = 0
n = int(input())
for _ in range(n):
	tmp = input().rstrip('\n').split(' ')
	sum41 += calc(int(tmp[0]), tmp[1])

print(1.0 * sum41)

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)