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: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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: Accepted

Solution code:
N=int(input())
mo=[]
for _ in range(N):
    x,u=input().split()
    x=float(x)
    mo.append([x,u])
okz=0
for i in mo:
    if i[1]=="JPY":
        okz +=i[0]
    else:
        okz += i[0]*380000

print(okz)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
INF = 10**9
MOD = 10**9 + 7

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

Submission status: Accepted

Solution code:
n = int(input())
a = [input().split() for _ in range(n)]  # x, u

ans = sum([float(x)*380000.0 if u == "BTC" else float(x) for x, u in a])
print(ans)

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    xus = [input() for _ in range(n)]
    ans = 0
    for xu in xus:
        x, u = xu.split()
        if u == "JPY":
            ans += float(x)
        if u == "BTC":
            ans += float(x) * 380000.0

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n = int(input())
a = [input().split() for _ in range(n)]  # x, u

sm = 0
for x, u in a:
    if u == "JPY":
        sm += float(x)
    else:
        sm += float(x)*380000.0
print(sm)

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())

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

print(ans)

Submission status: Accepted

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

ans = 0
for x, u in Gifts:
    if u == 'JPY':
        ans += int(x)
    else:
        ans += 380000 * float(x)
print(ans)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
a=0
for i in range(int(input())):
  b=input().split()
  if b[1]=='JPY':
    a+=eval(b[0])
  else:
    a+=eval(b[0])*380000
print(a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
#a,b=map(int,input().split())
#l=list(map(int,input().split()))
#l=[list(map(int,input().split())) for i in range(n)]
ans=0
for i in range(n):
    x,u=map(str,input().split())
    x=float(x)
    if u=="BTC":
        x=380000.0*x
    ans+=x
print('{:.7f}'.format(ans))

Submission status: Accepted

Solution code:
#import sys
#import math
#import numpy as np

'''a,b= map(int,input().split())'''
#a, b, c = [list(map(int, input().split())) for _ in range(3)]
#li0= [int(x) for x in input().split()]
#n,l= map(int, input().split())
#x = [list(map(int, input().split())) for _ in range(n)] 
a=int(input())
ans=0
x=[list(map(str,input().split())) for _ in range(a)]
for i in range(a):
  if x[i][1]=='BTC':
    ans+=float(x[i][0])*380000
  else:
    ans+=int(x[i][0])
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
ans = 0.0
for _ in range(N):
  x_str, unit = map(str, input().split())
  if unit == 'JPY':
    ans += int(x_str)
  else:
    ans += float(x_str) * 380000
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
x = []
u = []
for i in range(n):
    a,b = input().split()
    x.append(float(a))
    u.append(b)

s = 0    
for j in range(n):
    if u[j] == 'JPY':
        s += x[j]
    else:
        s += x[j] * 380000
print(s)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#ABC119

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

Submission status: Accepted

Solution code:
n = int(input())
x = [0] * n
u = ['.'] * n


for i in range(n):
    tmp = input().split()
    x[i], u[i] = float(tmp[0]), str(tmp[1])


total = 0
for i in range(n):
    if u[i] == 'JPY':
        total += x[i]
    else:
        total += 380000 * x[i]

print(total)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
listx = []
listu = []
for i in range(n):
    x, u = input().split()
    listx.append(float(x))
    listu.append(u)

s = 0
for i in range(n):
    if listu[i] == "JPY":
        s += listx[i]
    else:
        s += listx[i] * 380000

print(s)

Submission status: Accepted

Solution code:
N = int(input())
total = 0
for _ in range(N):
    value, kind = input().split()
    if kind == "JPY":
        total += int(value)
    elif kind == "BTC":
        total += 380000 * float(value)
print(total)

Submission status: Accepted

Solution code:
N = int(input())
XL = []
for i in range(N):
    X,U = list(input().split())
    X = float(X)
    if U=="BTC":
        X = X*380000
    XL.append(X)

print(sum(XL))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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:
        ans += float(x) * 380000.0

print(ans)

Submission status: Accepted

Solution code:
import math
import string


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//math.factorial(n-r)*math.factorial(r)


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)

Submission status: Accepted

Solution code:
n = int(input())
li = []
btc = 380000
money = 0
for i in range(n):
    x,u = input().split()
    if u == "JPY":
        money += float(x)
    elif u == "BTC":
        money += float(x)*btc
print(money)

Submission status: Accepted

Solution code:
rate=380000
sum=0
n=int(input())
for i in range(n):
  x,u=map(str,input().split())
  y=float(x)
  if u=='BTC':
    sum+=rate*y
  else:
    sum+=y
print(sum)

Submission status: Accepted

Solution code:
N=int(input())
X=[list(map(str,input().split())) for i in range(N)]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

ans = 0

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

Submission status: Accepted

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

for i in range(N):
    value, kahei = input().split()
    value=float(value)
    
    if (kahei == 'BTC'):
        value *= 380000
    
    total += value

print(total)

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

Solution code:
n = int(input())

money = []

for i in range(n):
  x,u = input().split()
  x = float(x)
  if u == "BTC":
    x *= 380000.0
  money.append(x)

print(sum(money))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

N = int(input().strip())
x_u = [[j for j in input().split()] for i in range(N)]

amou=float(0)
for x_str,u in x_u:
    if u == "JPY":
        amou += float(x_str)
    else:
        amou += float(x_str) * 380000

print(amou)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
xu = [list(map(str,input().split())) for i in range(N)]

ans = 0

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

Submission status: Accepted

Solution code:
N = int(input())
a = [list(map(str, input().split())) for i in range(N)]
a = list(map(list, zip(*a)))
ans = 0
for i, v in enumerate(a[1]):
    if v == "JPY":
        ans += int(a[0][i])
    else:
        ans += float(a[0][i]) * 380000

print(ans)

Submission status: Accepted

Solution code:
N = int(input())
q = [None] * N
t = [None] * N
ans = 0
for i in range(N):
    q[i], t[i] = input().split()

for i, v in enumerate(t):
    if v == "JPY":
        ans += int(q[i])
    else:
        ans += float(q[i]) * 380000

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

d = {"JPY":0,"BTC":0}

for i in range(n):
    x, u = map(str,input().split())
    d[u] += float(x)
    continue

ans = d["JPY"] + d["BTC"]*380000

print(ans)

Submission status: Accepted

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

ans = 0
for i in range(N) :
    if list_u[i] == "JPY" :
        ans += int(list_x[i])
    else :
        ans += float(list_x[i]) * 380000.0

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

for i in x:
    if i[1] == "BTC":
        ans += float(i[0]) * 380000
    else:
        ans += float(i[0])
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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.0*x
print(ans)

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin

mod = 10**9 + 7

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))

N = ni()
ans = 0
for _ in range(N):
    x, u = ns().split()
    if u =="JPY":
        ans += int(x)
    else:
        ans += float(x)*380000
print("{:.6f}".format(ans))

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
bit = 380000
ans = 0.0
for i in range(n):
    x, y = [str(i) for i in input().split()]
    x = float(x)
    if y == 'BTC':
        ans += bit * x
    else:
        ans += x
print(ans)

Submission status: Accepted

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

    count=0
    for i in range(N):
        if U[i]=="JPY":
            count+=X[i]
        else:
            count+=380000*X[i]
    print(count)
if __name__=="__main__":
    main()

Submission status: Accepted

Solution code:
N=int(input())
ans=0
for i in range (N):
	A,B=input().split()
	if B=="JPY":
		ans+=float(A)
	elif B=="BTC":
		ans+=float(A)*380000.0
print(ans)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
xu = []
for i in range(n):
    xu.append([str(i) for i in input().split()])

ans = 0
for i in range(n):
    if xu[i][1] == "JPY":
        ans += int(xu[i][0])
    elif xu[i][1] == "BTC":
        ans += float(xu[i][0]) * 380000
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0
for x,u in XU:
    f = float(x)
    if u=='BTC':
        f *= 380000
    ans += f
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#119_B
Bit=380000.0
N=int(input())
Ans=0
for _ in range(N):
    x,u=input().split()
    x=float(x)
    if u=='JPY':
        Ans+=x
    else:
        Ans+=x*Bit
print(Ans)

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
N=int(input())
X=[]
U=[]
ans=0
for i in range(N):
	A,B=input().split()
	X.append(float(A))
	U.append(B)
for i in range(N):
	if U[i]=="JPY":
		ans+=X[i]
	elif U[i]=="BTC":
		ans+=(X[i]*380000.0)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

jpy = 0
btc = 0
for i in range(n):
    x, u = input().split()
    if u == 'JPY':
        jpy += float(x)
    else:
        btc += float(x)

ans = jpy + 380000 * btc
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
T=[]
N=int(input())
for i in range(N):
  x,u=map(str,input().split())
  if u=="BTC":
    T.append(float(x)*380000)
  else:
    T.append(float(x))
print(sum(T))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

ans = 0
for _ in range(N):
    x, u = input().split()
    x = float(x)
    if u == "BTC":
        x *= 380000.0
    ans += x
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(n):
    a, b = map(str, input().split())
    x.append(float(a))
    u.append(b)

for i in range(n):
    if u[i] == "JPY":
        ans += x[i]
    else:
        ans += x[i] * 380000.0

print(ans)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
rate = 380000.0

n = int(input())
xu = [list(input().split()) for _ in range(n)]

ans = 0
for i in xu:
    x, u = float(i[0]), i[1]
    if u == 'BTC':
        ans += x * rate
    else:
        ans += x

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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


def main():
    N = int(input())
    result = 0
    rate = 380000.0
    for _ in range(N):
        x, u = input().split()
        if u == 'BTC':
            result += float(x) * rate
        elif u == 'JPY':
            result += float(x)
    print(result)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())
rate = 380000.0
ans = 0
for i in range(N):
    dama = input().split()
    amount = float(dama[0])
    if dama[1] == "JPY":
        ans += amount
    else:
        ans += rate * amount
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
lst = []
for _ in range(n):
    x,y = [x for x in input().split()]
    lst.append([float(x),y])

money = 0

for i in range(n):
    if lst[i][1] == "JPY":
        money += lst[i][0]
    else:
        money += lst[i][0] * 380000.0

print(money)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
money = [0] * n
for i in range(n):
    x, u = list(map(str, input().split()))
    x = float(x)
    if u == 'BTC':
        u = 380000
    else:
        u = 1
    money[i] = x * u
print(sum(money))

Submission status: Accepted

Solution code:
n=int(input())
c=0.0
list = []
for i in range(n):
    a,b=input().split()
    list.append((float(a), b))

for i in range(n):
    if list[i][1]=='BTC':
        c+=float(list[i][0])*380000.0
    else:
        c+=float(list[i][0])
print(c)

Submission status: Accepted

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

print(sum)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

print(s)

Submission status: Accepted

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:
    ans += float(x) * 380000.0
print(ans)

Submission status: Accepted

Solution code:
def input_int():
    return map(int, input().split())

def input_int():
    return int(input())

def one_str():
    return input()

def many_int():
    return list(map(int, input().split()))

N=input_int()



dicts={}
dicts["JPY"]=0
dicts["BTC"]=0

for i in range(N):
    x, u = input().split()
    dicts[u] += float(x)

sums = dicts["JPY"] + dicts["BTC"] * 380000.0

print(sums)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
 
stdin = sys.stdin
 
ni = lambda: int(ns())
nf = lambda: float(ns())
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda x: [na() for _ in range(x)]
ns = lambda: stdin.readline().rstrip()
nas = lambda: stdin.readline().split()

n = ni()
x, u = [], []
for i in range(n):
    s = nas()
    a, b = float(s[0]), s[1].rstrip()
    x.append(a)
    u.append(b)

ans = 0.0
for i in range(n):
    if u[i] == "JPY":
        ans += x[i]
    else:
        ans += 380000.0 * x[i]

print(ans)

Submission status: Accepted

Solution code:
n = int(input())

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

print(ans)

Submission status: Accepted

Solution code:
n = int(input())
datax = []
datau = []
lst = []
for i in range(n):
    x,u = input().split()
    x = float(x)
    datax.append(x)
    datau.append(u)
for j in range(n):
    if datau[j] == "JPY":
        lst.append(datax[j])
    if datau[j] == "BTC":
        lst.append(datax[j]*380000.0)
print(sum(lst))

Submission status: Accepted

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

answer = 0
for i,j in cor:
    if j == 'JPY':
        answer += i
    else:
        answer += i*380000.0
print(answer)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

ans = 0

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

print(ans)

Submission status: Accepted

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

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

    if(u == "JPY"):
        sum_m += int(x)
    else:
        sum_m += float(x) * 380000
print(sum_m)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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