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.

Solution (Python):
N=int(input())
Amount=0
for i in range(N):
  a,u=input().split()
  if u=="JPY":
    unit=1
  else:
    unit=380000
  Amount+=float(a)*unit
print(Amount)

Solution (Python):
N = int(input())
x = []
sum = 0

for i  in range(N):
    x.append(list(map(str, input().split())))

for i in range(N):
    if x[i][1] == 'BTC':
        sum += float(x[i][0]) * 380000
    else:
        sum += float(x[i][0])

print(sum)

Solution (Python):
n = int(input())
a = [0] * n
b = [0] * n
s = 0
for i in range(n):
    a[i],b[i] = map(str, input().split())
    if b[i] == 'BTC':
        s += float(a[i]) * 380000.0
    s += float(a[i])

print(s)

Solution (Python):
N = int(input())
cnt = 0
for i in range(N):
    x, u = input().split()

    if u == 'JPY':
        cnt += float(x)
    else:
        cnt += 380000.0 * float(x)
print(cnt)

Solution (Python):
from sys import stdin

def toYen(btc):
  return btc * 380000.0

N = int(stdin.readline().strip())
total = 0
for i in range(N):
  inp = stdin.readline().split()
  money, currency = float(inp[0]), inp[1]
  if currency == 'JPY':
    total += money
  else:
    total += toYen(money)
    
print(total)

Solution (Python):
BTC = 380000.0
N = int(input())

total = 0
for i in range(N):
  x, u = input().split()
  if u == 'JPY':
    total += int(x)
  else:
    total += float(x) * BTC
print(total)

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

	if u == "JPY":
		amount += x
	else:
		amount += x * 380000.0

print(amount)

Solution (Python):
N = int(input())

sum = 0
for n in range(N):
    x, u = map(str, input().split())
    x = float(x)

    if u == "JPY":
        yen = 1.0
    elif u == "BTC":
        yen = 380000.0
    sum += x * yen
    
print(sum)

Solution (Python):
N = int(input())
rate = 380000.0
ans = 0.0

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

print('{:.7f}'.format(ans))

Solution (Python):
N = int(input())
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)

Solution (Python):
N = int(input())
count = 0
xulist = []
for i in range(N):
    x, u = map(str,input().split())
    x = float(x)
    xulist.append([x,u])

for i in range(N):
    if xulist[i][1] == 'BTC':
        count += xulist[i][0] * 380000.0
    elif xulist[i][1] == 'JPY':
        count += xulist[i][0]

print(count)

Solution (Python):
N = int(input())
ans = 0
rate = 380000

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

print('{:.11f}'.format(ans))

Solution (Python):
rate = {
	"JPY": 1.0,
	"BTC": 380000.0,
}

total = 0.0

for _ in range(int(input())):
	x, u = input().split()
	total += float(x) * rate[u]

print(total)

Solution (Python):
n = int(input())

bs = [input().split() for _ in range(n)]

ans = 0
for b in bs:
	if b[1] == "BTC":
		ans += float(b[0]) * 380000.0
	else:
		ans += float(b[0])
print(ans)

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

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

print(money)

Solution (Python):
def calcbtc(x):
	return int(380000*10000*x)
N = int(raw_input())
sum = 0
for i in range(0, N):
	gift = raw_input().split()
	if gift[1] == 'BTC':
		sum += calcbtc(float(gift[0]))
	else:
		sum += int(gift[0])*10000
print float(sum)/10000

Solution (Python):

import sys


def solve(N: int, x: "List[float]", u: "List[str]"):
    sum = 0.0
    for i in range(N):
        if u[i] == "JPY":
            sum += x[i]
        else:
            sum += x[i] * 380000
    print(sum)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    x = [float()] * (N)  
    u = [str()] * (N)  
    for i in range(N):
        x[i] = float(next(tokens))
        u[i] = next(tokens)
    solve(N, x, u)

if __name__ == '__main__':
    main()

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

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

print(money)

Solution (Python):
n = int(input())
ans = 0
for i in range(n):
    x,u = map(str,input().split())
    x = float(x)
    if u == 'JPY':
        ans += x
    else :
        ans += x*380000
print(ans)

Solution (Python):
_,*t=open(0);print(sum(38e4**('B'in s)*float(s[:-4])for s in t))

Solution (Python):
N = int(input())
rate = 380000.0
ans = 0.0
for i in range(N):
    x, u = input().split()
    x = float(x)
    ans += x * rate if u == "BTC" else x

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

Solution (Python):
N = int(input())
otoshidama = 0
for i in range(N):
    pay,yen = input().split()
    pay = float(pay)
    if yen == 'JPY':
        otoshidama += pay
    else:
        otoshidama += pay*380000
        
print(otoshidama)

Solution (Python):
N = int(input())

X = [None] * N
U = [None] * N

total = 0.

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

print('{:.5f}'.format(total))

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

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

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

Solution (Python):
n = int(input())
ans = 0
for i in range(n):
    x,u = map(str,input().split())
    x = float(x)
    if u == 'JPY':
        ans += x
    else:
        ans += 380000*x
print(ans)

Solution (Python):
N = int(input())
mo = 0
for i in range(N):
    x,y = map(str,input().split())
    x = float(x)
    if y == 'JPY':
        mo += x
    else:
        tmp = x*380000
        mo += tmp
print(mo)

Solution (Python):
n = int(input())
gou = 0
for i in range(n):
    x,y = map(str,input().split())
    x = float(x)
    if y == "JPY":
        gou += x
    else:
        m = x * 380000
        gou += m
        
print(gou)

Solution (Python):
import sys

N = int(input())
xu_list = [input().split() for i in range(N)]


ans = 0

for i in xu_list:
    if i[1] == 'BTC':
        ans += float(i[0]) * 380000
    else:
        ans += float(i[0])

print(ans)

Solution (Python):
N = int(input())
m = [input().split() for _ in range(N)]
s = 0.0
for x,u in m:
  if u == "JPY":
    s += float(x)
  elif u == "BTC":
    s+= float(x) * 380000.0
print(s)

Solution (Python):
N = int(input())
XU = [input().split() for _ in range(N)]
ans = 0
for x,u in XU:
    if u == 'JPY':
        ans += int(x)
    else:
        ans += float(x)*380000
print(ans)

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

Solution (Python):
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)

Solution (Python):
N = int(input())

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

print(money)

Solution (Python):
N = int(input())
xu = [input().split() for i in range(N)]
print(sum([float(x) if u == 'JPY' else float(x)*380000.0 for x,u in xu]))

Solution (Python):
N = int(input())
xu = [input().split() for i in range(N)]
print(sum([float(x) if u == 'JPY' else float(x)*380000 for x,u in xu]))

Solution (Python):
n = int(raw_input())
x = []
u = []
total = 0
for i in range(n):
	xi, ui = map(str,raw_input().split())
	if ui == 'BTC':
		sumi = float(xi) * 380000.0
	else:
		sumi = float(xi)
	total += sumi

print total

Solution (Python):
N = int(input())
ans = 0.0
for i in range(N):
    mon, kind = input().split()
    mon = float(mon)
    if kind == 'BTC':
        mon = 380000.0 * mon
    ans += mon
print(ans)

Solution (Python):
N = int(input())
m = 0.0
for _ in range(N):
	v, t = input().split()
	m += float(v) if t == 'JPY' else float(v) * 380000.0
print(m)

Solution (Python):
N=int(input())
T=[0]*N
mysum=0
for i in range(N):
    T[i]=[float(i) for i in input().replace("JPY","1").replace("BTC","380000").split()]
    mysum+=T[i][0]*T[i][1]
print(mysum)

Solution (Python):
N = int(input())
ans = 0.0
for _ in range(N):
    x, u = input().split()
    if u == 'JPY':
        ans += float(x)
    elif u == 'BTC':
        ans += float(x) * 380000.0
print(ans)

Solution (Python):
N = int(input())
ans = 0
for _ in range(N):
    x, u = input().split()
    if u == 'JPY':
        ans += float(x)
    elif u == 'BTC':
        ans += float(x) * 380000.0
print(ans)

Solution (Python):
N = int(input())
x, u = [0] * N, [0] * N
for i in range(N):
    x[i], u[i] = input().split()
bsum, ysum = 0, 0
for i in range(N):
    if u[i] == 'BTC':
        bsum += float(x[i])
    else:
        ysum += float(x[i])
print(ysum + bsum * 380000)

Solution (Python):

N = int(input())

xu = [input().split() for _ in range(N)]
count = 0
for i in range(N):
    if xu[i][1] == 'JPY':
        count += int(xu[i][0])
    else:
        count += float(xu[i][0]) * 380000


print(count)

Solution (Python):
n = int(input())
ret = 0
for i in range(n):
    x, u = input().split(' ')
    x = float(x)
    if(u == 'BTC'):
        x = 380000 * x
    ret = x + ret
print(ret)

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

Solution (Python):
N = int(input())
xu = [0]*N
for i in range(N):
    xu[i]=input().rstrip().split()



sum = 0
for i in range(N):
    if xu[i][1]=='BTC':
        sum += 380000.0*float(xu[i][0])
    else:
        sum += int(xu[i][0])


print(sum)

Solution (Python):
N = int(input())
ans = 0
for i in range(N):
    x,u = input().split()
    if u == 'JPY':
        ans += float(x)
    if u == 'BTC':
        ans += float(x) * 380000
print("%lf" % (ans))

Solution (Python):
N = int(input())
jpy = 0
btc = 0
for i in range(N):
    s = input().split()
    if s[1] == 'JPY':
        jpy += int(s[0])
    else:
        btc += float(s[0])
print(jpy + btc * 380000)

Solution (Python):
N = int(input())
BTC = 380000.0
money = 0

for i in range(N):
  x,u = input().split()
  x = float(x)
  
  if u == "BTC":
    money += x*BTC
  elif u == "JPY":
    money += x

print(money)

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

Solution (Python):
N = int(input())
res = 0
for i in range(N):
    R = input().split()
    if R[1] == "BTC":
        res  = res + 380000 * float(R[0])
    else:
        res  = res + int(R[0])
print("{:.14f}".format(res))

Solution (Python):
N= int(input())
x = [input().split() for i in range(N)]

money = 0
for i in range(N):
  if x[i][1] == 'JPY':
    money += float(x[i][0])
  else:
    money += float(x[i][0]) * 380000
print(money)

Solution (Python):
N = int(input())
x = [input().split() for i in range(N)]

money = 0
for i in range(N):
  if x[i][1] == 'JPY':
    money += float(x[i][0])
  else:
    money += float(x[i][0]) * 380000.0
print(money)

Solution (Python):
N = int(input())
xu = [list(input().split()) for i in range(N)]
money = 0

for x, u in xu:
    if u == 'JPY':
        money += float(x)
    else:
        money += float(x) * 380000.0

print(money)

Solution (Python):
def main():
	n = int(input())
	total = 0
	for _ in range(n):
		x, u = input().split()
		x = float(x)
		if u == "BTC":
			total += 380000.0*x
		else:
			total += x
	print(total)

if __name__ == '__main__':
    main()

Solution (Python):
import sys
input = sys.stdin.readline

N = int(input())
a = [list(input().split()) for i in range(N)]
res = 0
for x, u in a:
    x = float(x)
    if u=="JPY":
        res += x
    else:
        res += x*380000.0
print(res)

Solution (Python):
N = int(input())

ans = 0

for n in range(N):
    x,u = map(str, input().split())
    if u == 'JPY':
        ans += int(x)
    else:
        ans += float(x)*380000

print(ans)

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

print(ans)

Solution (Python):
N = int(input())
ans = 0
for i in range(N):
  xi,ui = input().split()
  if ui == "BTC":
    ans = ans + float(xi)*380000.0
  else:
    ans = ans + int(xi)
print(ans)

Solution (Python):
many = int(input())
sum_money = 0
for i in range(many):
    money, currency = map(str, input().split())
    if currency == 'JPY':
        sum_money += int(money)
    else:
        sum_money += 3.8e5 * float(money)

print(sum_money)

Solution (Python):
N = int(input())
xu = [input().split() for _ in range(N)]
t = 0
for x, u in xu:
    if u == 'JPY':
        t += int(x)
    else:
        t += float(x) * 380000
print(t)

Solution (Python):
N = int(raw_input())
total = 0
for n in range(N):
    x,u = raw_input().split()
    if u == 'JPY':
        total += int(x)
    else:
        total += float(x)*380000.0
print total

Solution (Python):
def gifts(li):
    if li[1] == "BTC":
        return float(li[0]) * 380000 
    else:
        return float(li[0])
n = int(input())
li_xu = []
sum = 0
for i in range(n):
    li_xu = input().split()
    sum += gifts(li_xu)
print(sum)

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

print(ans)

Solution (Python):
n = int(input())
BTC = 380000.0
total = 0

for _ in range(n):
    x, u = list(map(str, input().split(' ')))
    x = float(x)
    if u == 'JPY':
        total += x
    if u == 'BTC':
        total += (x * BTC)

print(total)

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

Solution (Python):

import sys

def main():
	N = int(input());
	tama = []

	for _ in range(N):
		tmp = input().split(" ")
		x, u = tmp[0], tmp[1]
		tama.append((x, u))

	ans = 0
	for i in tama:
		x, u = i
		if u == "BTC":
			ans += float(x) * 380000
		else:
			ans += int(x)
	print(ans)

if __name__ == "__main__":
	main()

Solution (Python):
N = int(input())
Y = 0
for n in range(N):
  y, u = input().split()
  if u == 'JPY':
    Y += int(y)
  else:
    Y += float(y) * 380000.0
print(Y)

Solution (Python):
def BTCtoJPY(BTC):
    return BTC*380000.0

def main():
    accum = 0
    X = []
    N = int(input())
    for i in range(N):
        X.append(input().split())
    for i in X:
        if i[1] == "BTC":
            accum += BTCtoJPY(float(i[0]))
        else:
            accum += float(i[0])
    print(accum)

main()

Solution (Python):
N=int(input())
s=0
for i in range(N):
  l=list(input().split())
  if l[1]=="JPY":
    m=int(l[0])
  else:
    m=float(l[0])*380000
  s+=m
print(s)

Solution (Python):
N = int(input())

total = 0
for i in range(N):
    x, u = (i for i in input().split())
    x = float(x)
    if(u=="BTC"):
        total+=x*380000.0
    else:
        total+=x

print(total)

Solution (Python):
n = int(input())
jpysum = 0
btcsum = 0
for i in range(n):
  x, u = map(str, input().split())
  if u == "JPY":
    jpysum += float(x)
  else:
    btcsum += float(x)
ans = jpysum + 380000.0 * btcsum
print(ans)

Solution (Python):
N = int(input())
XU = [list(input().split()) for _ in range(N)]
btc = 380000.0

summ = 0
for xu in XU:
    if xu[1] == 'BTC':
        summ += float(xu[0]) * btc
    else:
        summ += float(xu[0])

print(summ)

Solution (Python):
N = int(input())

sum_jpy = 0.0
sum_bit = 0.0
sum_all = 0.0
btc = 380000.0
for _ in range(N):
	x,u = map(str, input().split())
	if u == "JPY":
		sum_jpy += float(x)
	else:
		sum_bit += float(x)

sum_all = sum_jpy + btc * sum_bit

print(sum_all)

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

Solution (Python):

"""
B - Digital Gifts
https://atcoder.jp/contests/abc119/tasks/abc119_b

"""
import sys


def main(args):
    N = int(input())
    total = 0
    BTC = 380000
    for _ in range(N):
        x, u = input().split()
        if u == 'JPY':
            total += float(x)
        else:
            total += float(x) * BTC
    print(total)


if __name__ == '__main__':
    main(sys.argv[1:])

Solution (Python):
N=int(input())
P=0
for i in range(N) :
  A,B=input().split()
  if B=="JPY" :
    P+=int(A)  
  else :
    P+=float(A)*380000
print(P)

Solution (Python):
N = int(input())
xus = [[x for x in input().split()] for _ in range(N)]

ans = 0
for x, u in xus:
    if u == "JPY":
        ans += int(x)
    else:
        ans += 380000.0 * float(x)

print(ans)

Solution (Python):
N = int(input())
money = {'JPY': 0, 'BTC': 0.0}
for i in range(N):
    u, x = input().split()
    if x == "JPY":
        money['JPY'] += int(u)
    else:
        money['BTC'] += float(u)
print(money['JPY'] + money['BTC'] * 380000.0)

Solution (Python):
N = int(input())
X = [0] * N
U = [0] * N
sum = float(0)
for i in range(N):
    X[i], U[i] = input().split()
    X[i] = float(X[i])
    if U[i] == 'BTC':
        X[i] = X[i] * 380000.0
    sum = sum + X[i]
print(sum)

Solution (Python):
N = int(input())

total = 0
for i in range(N):
    x, u = input().split()
    x = float(x)
    if u == 'JPY':
        total += x
    else:
        total += x * 380000

print(total)

Solution (Python):
N=int(input())
a=[input().split() for _ in range(N)]
sum=0
for l in a:
    if l[1]=='JPY':
        sum+=float(l[0])
    else:
        sum+=float(l[0])*380000.0
print(sum)

Solution (Python):
def get_yen(x, u):
    if u == 'BTC':
        return x * 380000.0
    else:
        
        return x

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

sum = 0
for x, u in zip(X, U):
    sum = sum + get_yen(x, u)

print(sum)

Solution (Python):
N = int(input())
XN_sum = 0
for i in range(N):
    X, U = [x for x in input().split()]
    if U == 'JPY':
        XN_sum += float(X)
    else:
        XN_sum += float(X) * 380000

print(XN_sum)

Solution (Python):

import sys


def solve(N: int, x: "List[float]", u: "List[str]"):
    ret = 0
    for i in range(N):
        if u[i] == "JPY":
            ret += x[i]
        else:
            ret += 380000.0 * x[i]
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    x = [float()] * (N)  
    u = [str()] * (N)  
    for i in range(N):
        x[i] = float(next(tokens))
        u[i] = next(tokens)
    solve(N, x, u)

if __name__ == '__main__':
    main()

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

Solution (Python):

n = int(raw_input())
y = 0.0
for i in range(0,n):
    x, u = map(str, raw_input().split())
    if u == 'JPY': y += float(x)
    elif u == 'BTC': y += float(x) * 380000

print y

Solution (Python):
from datetime import datetime
n = int(input().rstrip())
l = [[i for i in input().split()] for i in range(n)]
total = 0
for v in l:
    if v[1] == "JPY":
        total += int(v[0])
    elif v[1] == "BTC":
        total += float(v[0]) * 380000.0
print(total)

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

if __name__  == '__main__':
    main()

Solution (Python):
N = int(input())
money = 0

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

Solution (Python):


N = int(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)

Solution (Python):
n=int(input())
s=0
for i in range(n):
  a,d=input().split()
  if d=="JPY":
    s+=float(a)
  else:
    s+=float(a)*380000
print(s)

Solution (Python):
a=int(input())
ans=0
for i in range(a):
    a,b=input().split()
    if b=="JPY":
        ans+=int(a)
    else:
        ans+=float(a)*380000.0
print(ans)

Solution (Python):
n = int(input())
s = 0
for i in range(0,n):
    x,u = list(input().split())
    if u == "BTC":
        y = float(x)*380000.0
    else:
        y = float(x)
    s += y
print(s)

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

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

print(ans)

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

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

print(sum)

Solution (Python):
N=int(input())


s=0
for i in range(N):
	x,u=input().split(" ")
	s+=(u=="JPY")*float(x)+(u=="BTC")*380000.0*float(x)
print(s)

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

Solution (Python):
from sys import stdin

BTC_RATE = 380000.0

N = int(stdin.readline().rstrip())


xu_list = [[x for x in stdin.readline().rstrip().split()] for _ in range (N)]

sum_num = 0
for x, u in xu_list:
    x = float(x)
    if u == "JPY":
        sum_num += x
    else:
        sum_num += x * BTC_RATE

print(sum_num)

Solution (Python):
N = int(input())
count = 0
for i in range(N):
    xu = input().split()
    x = float(xu[0])
    if xu[1] == "JPY":
        count += x
    else:
        count += (x * 380000)
print(count)

Solution (Python):
N = int(input())

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

Solution (Python):
n = int(input())
money = [input().split() for _ in range(n)]
jpy_money = [int(i[0]) if i[1] == 'JPY' else float(i[0]) * 380000.0 for i in money]
print(sum(jpy_money))

Solution (Python):
N = int(input())

def main():
    ans = 0
    for i in range(N):
        x, u = input().split()
        x = float(x)
        if u == 'JPY':
            ans += x
        else:
            ans += x*380000
    return ans


if __name__ == '__main__':
    print(main())

Solution (Python):
n=int(input())
sum=float(0.0)
conversion=380000.0
for i in range(n):
  x,u=map(str,input().split())
  if u=='JPY':
    sum += float(x)
  else:
    sum += float(x)*conversion
print(sum)

Solution (Python):
n=int(input())
cnt=0
for i in range(n):
    a,b=input().split()
    if b=="BTC":
        cnt+=380000.0*float(a)
    else:
        cnt+=int(a)
print(cnt)

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

Solution (Python):
N = int(input())

sum = 0
for i in range(N):
    li = []
    li = list(input().split())
    
    if(str(li[1]) == "JPY"):
        sum += float(li[0])
    elif(str(li[1]) == "BTC"):
        sum += float(li[0])*380000

print(sum)

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

Solution (Python):
N = int(input())

s = 0.0
for i in range(N):
    x, u = input().split()
    if u == 'JPY':
        s += int(x)
    else:
        s += float(x) * 380000.0

print(s)

Solution (Python):



ans=0

N=int(input())
for i in range(N):
    money=input().split()

    if money[1]=="JPY": ans+=float(money[0])
    else: ans+=float(money[0])*380000.0

print(ans)

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

Solution (Python):
N = int(input())
ttl = 0

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

print(ttl)

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

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

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

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

Solution (Python):


n = int(input())
money = []
sum = 0
for i in range(0,n):
    money.append(input().split())
for i in money:
    if i[1] == "JPY":
        sum += float(i[0])
    else:
        sum += float(i[0]) * 380000.0
print(sum)

Solution (Python):
n=int(input())
xu=[]
for i in range(n):
    xu1=input().split()
    xu.append(xu1)
BTC=[]
JPY=[]
for j in xu:
    if j[1]=='BTC':
        BTC.append(float(j[0]))
    else:
        JPY.append(int(j[0]))
print(380000.0*sum(BTC)+sum(JPY))

Solution (Python):
n = int(input())
summm = 0.0

for i in range(n):
    xu = list(map(str, input().split()))
    if xu[1] == "JPY":
        summm = summm + float(xu[0])
    else:
        summm = summm + float(xu[0]) * 380000.0

print(summm)

Solution (Python):
N = int(input())
sum = 0

for i in range(N):
  tmp = input().split()
  x = tmp[0]
  u = tmp[1]
  
  if u == 'JPY':
    sum += int(x)
  else:
    sum += float(x) * 380000.0

print(sum)

Solution (Python):
n = int(input())
otosidama_list=[]
ans = 0
for i in range(n):
        otosidama_list.append(input().split(" "))

for j in range(n):
        otosidama_list[j][0] = float(otosidama_list[j][0])
        if otosidama_list[j][1] == "JPY":
                ans += otosidama_list[j][0]
        elif otosidama_list[j][1] == "BTC":
                ans += otosidama_list[j][0] * 380000.0
print(ans)

Solution (Python):


N = int(input())

S = 0
for i in range(N):
    x_t,y_t = list(input().split())
    
    
    if y_t == "JPY":
        S += int(x_t)
    else:
        S += float(x_t)*380000.0
print(S)

Solution (Python):
n = int(input())
res = 0
for i in range(n):
    xu = input().split()
    if xu[1] == "JPY":
        res += float(xu[0])
    else:
        res += float(xu[0]) * 380000
print(res)

Solution (Python):
def int_raw():
    return int(raw_input())
 
def words_raw():
    return raw_input().split()

BTC_TO_JPY = 380000.0
N = int_raw()
sum = 0.0
for _ in range(N):
	present, currency = words_raw()
	if currency == 'JPY':
		sum += int(present)
	else:
		sum += float(present) * BTC_TO_JPY
print sum

Solution (Python):
N = int(input())
sum_money = 0

for i in range(N):
  x, u = map(str, input().split())
  if u == 'JPY':
    sum_money += int(x)
  else:
    sum_money += (float(x) * 380000.0)
    
print(sum_money)

Solution (Python):
n=int(input())
kane=0

for _ in range(n):
  x, u= input().split()
  if u == "JPY":
    kane +=int(x)
  elif u == "BTC":
    kane += 380000.0*float(x)
    
print(kane)

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

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

Solution (Python):
a = int(input())
b = [list(map(str,input().split()))for i in range(a)]
c=0
for i in range(a):
  if b[i][1]=="JPY":
    c+=float(b[i][0])
  else :
    c+=float(b[i][0])*380000
print(c)

Solution (Python):
N = int(input())
ans = 0
for i in range(N):
    cur,unit = map(str, input().split())
    if unit == 'JPY':
        ans += int(cur)
    else:
        ans += float(cur) * 380000
print(ans)

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

Solution (Python):







N = int(input())

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

print(sum)

Solution (Python):
N = int(input())

sum = 0

JPY = 1
BTC = 380000.0

for _ in range(N):
    money, style = map(str, input().split())
    if style == 'JPY':
        sum += float(money) * JPY
    else:
        sum += float(money) * BTC

print(sum)

Solution (Python):
N = int(input())
coin = []
index = 0
cash = 0
man = 1
answer = 0.0
while(N > 0):
    j = [i for i in input().split()]
    coin.append(j)
    coin[index][cash] = float(coin[index][cash])
    index += 1
    N -= 1
index -= 1
while(index >= 0):
    if(coin[index][man] == "JPY"):
        answer += float(coin[index][cash])
    else:
        answer += float(coin[index][cash]) * 380000.0
    index -= 1
print(answer)

Solution (Python):

n = int(input())
sum = 0
for i in range(n):
    a, b = map(str, input().split())
    a = float(a)
    if(b=="JPY"):
        sum += a
    else:
        sum += a*380000.0
print(sum)

Solution (Python):
N = int(input().strip())

xus = [input().split() for i in range(0,N)]

sum = 0
for xu in xus:
    if xu[1] == 'BTC':
        sum += float(xu[0]) * 380000.0
    else:
        sum += float(xu[0])

print(sum)