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: Wrong Answer

Solution code:
N = int(input())
ans = 0
for i in range(N):
    x,u = map(str,input().split())
    if(u == "JPY"):
        ans += int(x)
    else:
        x = x.replace(".","")
        ans += (int(x) * 380000 // 10**8)
print(str(ans))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from decimal import *

import numpy as np

import math

if __name__ == '__main__':
    n = int(input())
    count = 0

    for i in range(n):
        b, c = map(str, input().split())
        if c =="JPY":
            count+=int(b)
        else:
            count+=  Decimal(380000 ) * Decimal(b)

    print(int(count))

Submission status: Wrong Answer

Solution code:
n = int(input())
list = []
ans = 0
for i in range(n):
    a,b=input().split()
    list.append((float(a), b))
for i in range(n):
  if(list[i][1] == 'BTC'):
    ans += (list[i][0]) * 38000
  else:
    ans += (list[i][0])
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
import math
from collections import Counter
import itertools
import fractions
import datetime
from decimal import Decimal
#from functools import reduce

# 入力を整数に変換して受け取る
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
# 入力全てを整数に変換したものの配列を受け取る
def LI(): return list(map(int, sys.stdin.readline().split()))
# 入力全てを整数に変換して1引いたものの配列を受け取る
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

# リストを改行区切りで出力する
p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))
p2S = lambda x: print(*x, sep=" ")

# ###########################################

N=II()
XU=[list(SR().split()) for _ in range(N)]
print(XU)
ans = 0

for xu in XU:
    if xu[1] == 'JPY':
        ans += int(xu[0])
    else:
        ans += float(xu[0])*380000
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = 0
for i in range(n):
    x, v = input().split()
    if v == 'JPY':
        ans += int(x)
    else:
        ans += (int(float(x) * 10**8) * 380000) // 10**8

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

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) * 38000.0
    
print(ans)

Submission status: Wrong Answer

Solution code:
s = int(input())
m = 0
t = 0
for i in range(s):
    m, n = input().split()
    m = float(m)
    if n == 'JPY':
        t += m
    else:
        t += 38000*m
print(t)

Submission status: Wrong Answer

Solution code:

n=int(input())
xu=[]
total=0
for i in range(n):
    xu.append([x for x in input().split()])

a=380000.0
for i in range(n):
    if xu[i][1]=="JPY":
        total+=float(xu[i][0])
    else:
        total+=float(xu[i][0])*a
        print(total)

Submission status: Wrong Answer

Solution code:
n = int(input())
money = 0
for _ in range(n):
  p = input().split()
  if p[1] == 'JPY':
    money += int(p[0])
  elif p[1] == 'BTC':
    money += int(float(p[0]) * 380000)

print(money)

Submission status: Wrong Answer

Solution code:
ans = 0
N = int(input())
for _ in range(N):
  x, y = input().split()
  if y == 'JPY':
    ans += int(x)
  else:
    ans += round(float(x) * 380000.0)

print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
xy=[list(map(str,input().split())) for _ in range(n)]
ans=0
for i in range(n):
    if xy[i][1]=="BTC":
        ans+=38000*float(xy[i][0])
    else:
        ans+=float(xy[i][0])
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
xy=[list(map(str,input().split())) for _ in range(n)]
ans=0
for i in range(n):
    if xy[i][1]=="BTC":
        ans+=38000*float(xy[i][0])
    else:
        ans+=int(xy[i][0])
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
x=[list(input().split()) for i in range(n)]
cnt=float(x[0][0])
for i in range(1,n):
    if x[i][1]=="BTC":
        cnt+=float(x[i][0])*380000
    else:
        cnt+=float(x[i][0])

print(cnt)

Submission status: Wrong Answer

Solution code:
n=int(input())
x=[list(input().split()) for i in range(n)]
cnt=0
for i in range(1,n):
    cnt+=float(x[i][0])*380000

print(float(x[0][0])+cnt)

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
xv=[]
for _ in range(N):
    xv.append(tuple(input().split()))
profit=0
for val in xv:
    if val[1]=='JPY':
        profit+=int(val[0])
    else:
        profit+=float(val[0])*380000.0

print(N, xv)
print(profit)

Submission status: Wrong Answer

Solution code:
N=int(input())

answer=0

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

print(answer)

Submission status: Wrong Answer

Solution code:
N = int(input())

d = {}
for _ in range(N):
    Ns = input().split()
    money = float(Ns[0])
    if Ns[1] == 'BTC':
        btc = money * 380000.0
        d[btc] = 0
    else:
        d[money] = 0

print(sum(d))

Submission status: Wrong Answer

Solution code:
N = int(input())

d = {}
for _ in range(N):
    Ns = input().split()
    money = float(Ns[0])
    if Ns[1] == 'BTC':
        btc = money * 380000
        d[btc] = 0
    else:
        d[money] = 0

print(int(sum(d)))

Submission status: Wrong Answer

Solution code:
n = int(input())
x = []
ans = 0
for i in range(n):
  array = list(map(str,input().split()))
  x.append(array)
  if x[i][1] == "JPY":
  	ans += int(x[i][0])
  else:
  	ans += int(float(x[i][0]) * 380000)
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
xu = [input().split() for _ in range(n)]
ans = 0

for x, u in xu:
	print(x, u)
	if u == "BTC":
		ans += float(x) * 380000.0
	else:
		ans += int(x)

print(ans)

Submission status: Wrong Answer

Solution code:
import sys
import math
import itertools

n=input()
sum=0

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

Submission status: Wrong Answer

Solution code:
n = int(input())

#iでリストを受け取るために、わざと2次元配列にしていることに注意する。
otoshidama = [float(i[0]) if i[1] == "JPY" else float(i[0])*380000 for j in range(n) for i in [input().split()]]
print(otoshidama)
print(sum(otoshidama))

Submission status: Wrong Answer

Solution code:
from collections import defaultdict
d=defaultdict(list)
n=int(input())
for i in range(n):
	x,c=input().split()
	x=float(x)
	if c=='BTC':
		x=x*380000
		d[c]=x
	else:
		d[c]=x
print(sum(d.values()))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
count = 0
for i in range(n):
  x, u = input().split()
  x = float(x)
  if u == 'BTC':
    x = x * 3.8e6
  count += x
print(x)

Submission status: Wrong Answer

Solution code:
n = int(input())
count = 0
for i in range(n):
  x, u = input().split()
  x = float(x)
  if u == 'BTC':
    x = x * 3.8e5
  count += x
print(x)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

xu = [[i for i in input().split()] for j in range(n)]

ans = 0

for i in range(n):
    if xu[i][1] == 'JPY':
        ans += int(xu[i][0])
    else:
        ans += 1000*float(xu[i][0])
        
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

xu = [[int(i) for i in range(2)] for j in range(n)]

ans = 0

for i in range(n):
    if xu[i][1] == 'JPY':
        ans += xu[i][0]
    else:
        ans += 1000*xu[i][0]
        
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())
x = [list(input().split()) for i in range(N)]
ans = 0
for i in range(N):
  if x[i][1] == "JPY":
    ans += int(x[i][0])
  elif x[i][1] == "BTC":
    ans += int(float(x[i][0]) * 380000)
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#テストファイルで実行する時
import sys
if sys.platform =='ios':
    sys.stdin=open('input_file.txt')


n = int(input())
lists = [input().split() for i in range(n)]

print(lists)

ans = 0

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# = map(int, input().split())
n = int(input())
# = input()
# = list(map(int, input().split()))

to = 0
for i in range(n):
	x, u = map(str, input().split())
	if u == "JPY":
		to += int(x)
	elif u == "BTC":
		to += int(float(x)*380000)

print(to)

Submission status: Wrong Answer

Solution code:
#2019/10/21
N, *x = [list(s.split()) for s in open(0)]
# print(N, x)
sum = 0
for i, j in x:
    if (j == 'JPY'):
        sum += float(i)
    else:
        sum += float(i)*38000
print(sum)

Submission status: Wrong Answer

Solution code:
N = int(input())

total = 0

for i in range(N):
	X = list(input().split())
	X[0] = float((X[0]))
	if X[1] == "BTC":
		X[0] = X[0] * 38000

	total += X[0]
	
print(total)

Submission status: Wrong Answer

Solution code:
n = int(input())
rate = 38000.0
ans = 0.0
for i in range(n):
    x,u = input().split()
    x = float(x)
    if u == "BTC":
        x *= rate
    ans += x
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
rate = 38000.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))

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 0
for i in range(n):
    ans += eval(input().replace(" ","*").replace("JPY","1").replace("BTC","380000"))
print(int(ans))

Submission status: Wrong Answer

Solution code:
n = int(input())

s=0

for i in range(n):
    x,u=map(str,input().split())
    if u == "JPY":
        s+=int(x)
    elif u == "BTC":
        s+=380000*float(x)
    else:
        s+=0
print(int(s))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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+=380000*x
print(int(ans))

Submission status: Wrong Answer

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+=3800*x
print(int(ans))

Submission status: Wrong Answer

Solution code:
n = int(input())
jpy = 0
btc = 0
for _ in range(n):
  x,y = input().split()
  z = x.split('.')
  x = z[0]
  if y == 'JPY':
    jpy += int(x)
  else:
    btc += int(x)
print(jpy + btc * 380000 // 1)

Submission status: Wrong Answer

Solution code:
n = int(input())
jpy = 0
btc = 0
for _ in range(n):
  x,y = input().split()
  z = x.split('.')
  x = z[0]
  if y == 'JPY':
    jpy += int(x)
  else:
    btc += int(x)
print(jpy + btc * 380000)

Submission status: Wrong Answer

Solution code:
n = int(input())
jpy = 0
btc = 0
for _ in range(n):
  x,y = input().split()
  z = x.split('.')
  x = z[0]
  if y == 'JPY':
    jpy += int(x)
  else:
    btc += int(x)
print(jpy + btc * 380000.0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
a=0
b=0
for i in range(N):
	n=[x for x in input().split()]
	if n[1] == "JPY": a+=int(n[0])
	else: b+=float(n[0])
print(a+b*38000)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
count = 0
for i in range(n):
  x, y = input().split()
  if y == 'JPY':
    x = int(x)
  else:
    x = float(x) * 3.8e5
  count += x
print(x)

Submission status: Wrong Answer

Solution code:
N=int(input())
xu=[list(map(str, input().split())) for _ in range(N)]
total=0
for i in range(N):
    if xu[i][1]=='JPY':
        total+=float(xu[i][0])
    else:
        total+=380000.0*float(xu[i][0])

Submission status: Wrong Answer

Solution code:
N=int(input())
xu=[list(map(str, input().split())) for _ in range(N)]
total=0
for i in range(N):
    if xu[i][1]=='JPY':
        total+=float(xu[i][0])
    else:
        total+=380000*float(xu[i][0])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
l=[[],[]]
for i in range(n):
        a,b=map(str,input().split())
        if b=='JPY':
                l[0].append(float(a))
        else:
                l[1].append(float(a)) 
print(l)
ans=0
for i in l[0]:
        ans+=i
for j in l[1]:
        ans+=j*380000
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
Yt108 = 0
for i in range(0, N):
	inpt = input().split()
	if inpt[1] == 'JPY':
		Yt108 += int(inpt[0])*(10**8)
	else:
		Yt108 += int(float(inpt[0])*(10**8))*380000
anst108 = str(Yt108)
print(anst108[:len(anst108)-8]+'.'+anst108[len(anst108)-8:])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    N = int(input())
    money = 0
    for i in range(N):
        X,U = input().split()
        if U == 'JPY':
            money +=int(X)
        else:
            money += float(X)*38000
    print(money)
if __name__ =='__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(N):
	x,u = input().split()

	if str(u) == 'JPY':
		ans = float(ans) + float(x)
	
	if str(u) == 'BTC':
		ans = float(ans) + float(x) * 380000

	print(u)

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = []
for i in range(n) :
    a_r = [num for num in input().split()]
    a.append(a_r)

sum = 0    
for tmp in a :
    if tmp[1] == "BTC" :
        sum += int(380000.0*float(tmp[0]))
    else :
        sum += int(tmp[0])
        
print(sum)

Submission status: Wrong Answer

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

ans=0
for i in range(N):
    ans+=float(listA[i][0])*(1,380000)[listA[i][1]=='BTC']
print(ans)

Submission status: Wrong Answer

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

print(int(res))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
list = []
for i in range(N):
    a, b = input().split()
    list.append(float(a) if b == "JPY" else float(a) * 380000)
print(list)
print(sum(list))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x = [i for i in input().split('\n')]
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(int(total))

Submission status: Wrong Answer

Solution code:
x = [i for i in input().split('\n')]
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: Wrong Answer

Solution code:
x = [i for i in input().rsplit('\n')]
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: Wrong Answer

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

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

print(total)

Submission status: Wrong Answer

Solution code:

N = int(input())
lst_1 = []
ans = 0

for n in range(N):
    lst_1.append(input().split())

print(lst_1)

for n in range(N):
    money = 0
    money = float(lst_1[n][0])
    if lst_1[n][1] == "BTC":
        money = money * 380000
    ans += money

print(ans)

Submission status: Wrong Answer

Solution code:
num = int(input())
total = 0
for i in range(num):
	li = input().split()
	if li[1] == "JPY":
		total += int(li[0])
	else:
		total += int(float(li[0])) * 380000
print(total)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 0.0
for _ in range(n):
    x, u = input().split()
    if u == 'JPN':
        ans += float(x)
    else:
        ans += float(x) *  380000.0
 
print("{:.11f}".format(ans))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
n = int(input())
y = 0
b = 0.0
for _ in range(n):
  n, s = input().rstrip().split()
  if s == 'JPY':
    y += int(n)
  else:
    b += float(n)

print(y + b * 38000.0)

Submission status: Wrong Answer

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

for _ in range(n):
    x, u = input().split()

    if u == 'JPY':
        total += int(x)
    else:
        total += float(x) * 38e4

Submission status: Wrong Answer

Solution code:
input()
print(sum([38e4**('B' in s)*float('0' + s[:-4]) for s in input()]))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
S=[]
for i in range(N):
    A=list(input().split())
    if A[1]=="JPY":
        S.append(int(A[0]))
    elif A[1]=="BTC":
        S.append(float(A[0])*380000)
print(sum(S)//10)

Submission status: Wrong Answer

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] = int(x[j])
    elif u[j] == 'BTC':
        x[j] = float(x[j]) * 38.0
print(np.sum(x) * 10000)

Submission status: Wrong Answer

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.0
    elif u[j] == 'BTC':
        x[j] = float(x[j]) * 38.0
print(np.sum(x) * 10000)

Submission status: Wrong Answer

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] = 10000
    elif u[j] == 'BTC':
        x[j] = float(x[j]) * 380000
print(np.sum(x))

Submission status: Wrong Answer

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] == 'BTC':
        x[j] = float(x[j]) * 38
print(np.sum(x) * 10000)

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    N = int(input())

    xu_list = [list(map(str, input().split())) for i in range(N)]

    answer = 0
    for xu in xu_list:
        if xu[1] == 'JPY':
            answer += int(xu[0])
        elif xu[1] == 'BTC':
            answer += int(float(xu[0]) * 380000.0)

    print(answer)

Submission status: Wrong Answer

Solution code:
#coding:utf-8

def main():
    N = int(input())
    money = []
    for i in range(N):
        x, u = input().split()

        if u == 'BTC':
            x = float(x) * 380000
        money.append(int(x))

    print(sum(money))


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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)

Submission status: Wrong Answer

Solution code:
from decimal import Decimal
N = int(input())

target = [list(input().split()) for i in range(N)]

result = 0

for t in target:
    if t[1] == 'JPY':
        result += int(t[0])
    else:
        result += round(Decimal(t[0]) * Decimal(38000.0), 5)
print(result)

Submission status: Wrong Answer

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(str, 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: Wrong Answer

Solution code:
import numpy as np
N = int(input())
x = [0]*N
u = [0]*N

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0.0
for _ in range(N):
    x,u = input().split()
    if u=="JPY":
        ans += int(x)
    else:
        ans += float(x)
        
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
res=0.0
for _ in range(N):
  mon,sib=input().split()
  if sib=='JPY':
    res+=float(mon)
  elif sib=='BTC':
    res++float(mon)*380000.0
print(res)

Submission status: Wrong Answer

Solution code:
#ABC119 B
N = int(input())
ans = 0
for i in range(N):
    x, v = input().split()
    x = float(x)
    if v == "BTC":
        x *= 38000.0
    ans += x 
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
money = 0
for i in range(n):
	a,b = map(str,input().split(' '))
	x = float(a)
	if b == 'JPY':
		money = money + x
	else:
		money = money + x * 380000.0

print('money')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
n = {}
ans = 0

while N > 0:
    key_and_value = input()
    key, value = key_and_value.split()
    n[key] = value
    N -= 1

for i in n:
    if n[i] == 'JPY':
        ans += int(i)
    else:
        ans += 380000 * float(i)

print(ans)

Submission status: Wrong Answer

Solution code:
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
	else:
		ans += int(b[0])
print(int(ans))

Submission status: Wrong Answer

Solution code:
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
ans = ans//1
print(ans)

Submission status: Wrong Answer

Solution code:
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(int(mysum))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

sum_all = sum_jpy + int(380000 * sum_bit)

print(sum_all)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

sum_all = int(sum_jpy + 380000 * sum_bit)

print(sum_all)

Submission status: Wrong Answer

Solution code:
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(int(summm))

Submission status: Wrong Answer

Solution code:
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

print(int(summm))

Submission status: Wrong Answer

Solution code:
N = int(input())
gift = []

for i in range(N):
    gift.append((input().split()))

sum = 0
for i in range(N):
    if gift[i][1] == "JPN":
        sum += float(gift[i][0])
    else:
        sum += float(gift[i][0]) * 380000

print(sum)