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())

sum = 0

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

print(sum)

Submission status: Accepted

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 += float(x[i][0]) * 380000
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:
import sys
def input(): return sys.stdin.readline().rstrip()

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

jpy = 0
btc = 0

for i in range(n):
  s = input().split()
  a = float(s[0])
  b = s[1]
  if b == 'JPY':
    jpy += a
  elif b == 'BTC':
    btc += a

btc = btc * 380000
print(jpy + btc)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#119 b
n=int(input())
x=[]
u=[]
btc=380000
ans=0
def yen_or_btc(m):
    if m=="JPY":
        return 1
    else:
        return btc

for i in range(n):
    y,b=list(input().split())
    y=float(y)
    x.append(y)
    u.append(b)

for i in range(n):
    ans+=x[i]*yen_or_btc(u[i])
print(ans)

Submission status: Accepted

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

for x, u in xu:
	
	if u == "BTC":
		ans += float(x) * 380000.0
	else:
		ans += int(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:
		ans += float(x) * 380000
print (ans)

Submission status: Accepted

Solution code:
import sys

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())
S_MAP = lambda: map(str, INPUT().split())

sys.setrecursionlimit(10 ** 9)


def main():
    N = INT()

    ans = 0
    for i in range(N):
        X, U = S_MAP()
        ans += int(X) if U == "JPY" else float(X) * 380000

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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())
x=[input().split() for _ in range(N)]
count=0
#print(N,x)
for i in range(N):
    x[i][0]=float(x[i][0])

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

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

Submission status: Accepted

Solution code:
n = int(input())
xu = []
for _ in range(n):
    x, u = map(str, input().split())
    xu.append((float(x), u))

ans = 0
for i in xu:
    if i[1] == "JPY":
        ans += i[0]
    else:
        ans += i[0] * 380000

print(ans)

Submission status: Accepted

Solution code:
N = int(input())

ans = 0
for _ in range(N):
  y, s = input().split()
  y = float(y)
  if s == "JPY":
    ans += y
  else:
    ans += y*380000
print(ans)

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.0)
print(cnt)

Submission status: Accepted

Solution code:
ans=0
for i in range(int(input())):
    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=0
for i in range(N):
    x, u = list(map(str, input().split()))
    if u == "JPY":
        sum+=int(x)
    else:
        sum+=float(x)*380000
print(sum)

Submission status: Accepted

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+=b_money

print(sum)

Submission status: Accepted

Solution code:
N=int(input())
jp="JPY"

ans=0.0
for i in range(N):
    y,u=input().split()
    x=float(y)
    d=380000.0
    if u==jp:
        d=1
    ans+=x*d
    
print(ans)

Submission status: Accepted

Solution code:
def main(n, x_u):
    ans = 0
    btc = 380000.0

    for x, u in x_u:
        if u == 'JPY':
            ans += int(x)
        else:
            ans += float(x) * btc

    print(ans)


if __name__ == "__main__":
    n = int(input())
    x_u = [input().split() for _ in range(n)]

    main(n, x_u)

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 i 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 i in range(N):
    x, u = input().split()
    if u == 'JPY': ans += float(x)
    else: ans += 380000.0 * float(x)
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
U = {'JPY': 1.0, 'BTC': 380000.0}
ans = 0.0
for i in range(N):
    x, u = input().split()
    ans += float(x) * U[u]
print(ans)

Submission status: Accepted

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

total_JPY = 0
for j in range(n):
    if l[j][1] == 'JPY':
        total_JPY += int(l[j][0])
    else:
        total_JPY += float(l[j][0])*380000
print(total_JPY)

Submission status: Accepted

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

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:
n = int(input())
ans = 0
for i in range(n):
    x, u = input().split()
    x =float(x)
    ans += x if u == 'JPY' else 380000*x
print(ans)

Submission status: Accepted

Solution code:
Row = int(input())
money = []
k=[]
num = 0
for _ in range(Row):
    a,b = map(str,input().split())
    money.append(float(a))
    k.append(b)
for i in range(Row):
    if k[i]=="JPY":
        num+=money[i]
    else:
        num=num+380000.0*money[i]
print(num)

Submission status: Accepted

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(sum(otoshidama))

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

for x, u in otoshidama:
    if u == 'JPY':
        ans += float(x)
    else:
        ans += float(x) * 380000

print(ans)

Submission status: Accepted

Solution code:
n = int(input())
y = 0
b = 0
r = 380000.0

for i in range(n):
  x, u = input().split()
  x = float(x)
  if u=="JPY":
    y += x
  else:
    b += x
    
print(y+b*r)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
ans = 0
for i 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:
"""
author : halo2halo
date : 16, Jan, 2020
"""

import sys
import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

N = int(readline())
ans = 0

for _ in range(N):
    x, u = readline().decode('utf8').split()
    if u == 'JPY':
        ans += int(x)
    else:
        ans += float(x) * 380000

print(ans)

Submission status: Accepted

Solution code:
N = int(input())
ans = 0.0
for _ in range(N):
  amount, kind = input().split()
  if kind == "JPY":
    ans += float(amount)
  elif kind == "BTC":
    ans += float(amount) * 380000.0
print(ans)

Submission status: Accepted

Solution code:
N = int(input())

ans = 0.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)

Submission status: Accepted

Solution code:
n = int(input())
ans = 0
for i in range(n):
    x,u = input().split()
    ans += float(x) * (1 if 'JPY' == u else 380000.0)
print('{:.8f}'.format(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 += 380000.0 * float(x)
        continue
    ans += int(x)

print(ans)

Submission status: Accepted

Solution code:
btc_rate = 380000.0

N = int(input())

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

Submission status: Accepted

Solution code:
import sys

def to_jpy(x, u):
    x = float(x)
    if u == 'BTC':
        x *= 3.8 * 10 ** 5
    return x

n, *xu = sys.stdin.read().split()
xu = zip(*[iter(xu)] * 2)

def main():
    res = 0
    for x, u in xu:
        res += to_jpy(x, u)
    return res

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

Submission status: Accepted

Solution code:
n = int(input())

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

print(y)

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

Submission status: Accepted

Solution code:
N = int(input())
otoshidama = {'JPY': 0, 'BTC': 0}
for _ in range(N):
  val, cur = input().split()
  otoshidama[cur] += float(val)

print(otoshidama['JPY'] + (otoshidama['BTC'] * 380000.0))

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:

n = int(input())
ans = 0.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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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(count)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(sum)

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

print(sum)

Submission status: Accepted

Solution code:
n = int(input().strip())
ans = 0
for _ 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:
ans=0
n=int(input())
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())
count = 0
for i in range(N):
	x = input().split()
	if x[1] == 'JPY':
		count += int(x[0])
	else:
		count += float(x[0])*380000.0
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
def input():
    return sys.stdin.readline().rstrip()

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

x_list = []
u_list = []
for _ in range(N):
    x, u = input().split()
    x_list.append(float(x))
    u_list.append(u)
ans = 0
for x, u in zip(x_list, u_list):
    if u == 'JPY':
        ans += x
    elif u == 'BTC':
        ans += x * 380000

print(ans)

Submission status: Accepted

Solution code:
p = {"JPY": 0, "BTC": 0}
for _ in range(int(input())):
    price, currency = input().split()
    price = float(price)
    p[currency] += price

print(p["JPY"] + 380000.0 * p["BTC"])

Submission status: Accepted

Solution code:
N=int(input())
M=[]
Y=[]
for i in range(N):
  n,a=input().split()
  M.append(float(n))
  Y.append(a)
m=0
r=380000
for i in range(N):
  if Y[i]=='JPY':
    m+=float(M[i])
  else:
    m+=float(M[i])*r
print(m)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

def main():
    N = int(input())
    ans = 0
    for _ in range(N):
        x, u = [x for x in input().split()]
        if u == 'BTC':
            ans += float(x) * 380000.0
        else:
            ans += float(x)

    print(ans)

    

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
R = 0
for _ in range(N):
    L = input().split()
    R += int(L[0]) if L[1] == "JPY" else float(L[0]) * 380000
print(R)

Submission status: Accepted

Solution code:
N = int(input())
R = 0
for _ in range(N):
    L = input().split()
    if L[1] == "JPY":
        R += int(L[0])
    else:
        R += float(L[0]) * 380000
print(R)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

res = 0

for i in range(n):
    if a[i][1] == "JPY":
        res += int(a[i][0])
    else:
        res += 380000 * float(a[i][0])
print(res)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
ans=0
for i in range(n):
  mon,ty = map(str,input().split())
  if ty == "JPY":
    ans += int(mon)
  else:
    ans += 380000 * float(mon)
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())
ans = 0
for _ 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())
x = [0] * N
u = [0] * N
for i in range(N):
    x[i], u[i] = map(str, input().split())

ans = 0
for i in range(N):
    if u[i] == "JPY":
        ans += int(x[i])
    else:
        ans += float(x[i]) * 380000
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
ans = 0
for _ in range(0, n):
  c, k = input().split()
  c = float(c)
  if k[0] == 'B':
    ans += 380000.0 * c
  else:
    ans += c
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+=float(a)
    if b=="BTC":ans+=float(a)*380000.0
print(ans)

Submission status: Accepted

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 += 380000*float(xu[i][0])
        
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
XU = [input().split() for _ in range(N)]
d = {"JPY": 1, "BTC": 380000}
print(sum(float(x) * d[u] for x, u in XU))

Submission status: Accepted

Solution code:
# Digital Gifts
# settings
BIT_unit = 380000

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

# output
print(total)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(N):
    money[i][0] = float(money[i][0])


for x, u in money:
    if u == 'JPY':
        ans += x
    else:
        ans += 380000 * x

print(ans)

Submission status: Accepted

Solution code:
N = int(input())
total = 0
for i in range(N):
    m, CUR = input().split()
    if CUR == "BTC":
        total += float(m) * 380000.0
    else:
        total += int(m)

print(total)

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
x = [list(map(str, input().split())) for _ in range(n)]
jp = 0
bt = 0

for i in range(n):
    if x[i][1] == 'JPY':
        jp += int(x[i][0])
    elif x[i][1] == 'BTC':
        bt += float(x[i][0])

print(jp + 380000*bt)

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

Submission status: Accepted

Solution code:
import bisect
import cmath
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7
# MOD = 998244353


N = int(sys.stdin.buffer.readline())
XY = [sys.stdin.buffer.readline().decode().rstrip().split() for _ in range(N)]


ans = 0.0
for x, y in XY:
    if y == 'BTC':
        ans += float(x) * 380000.0
    else:
        ans += float(x)
print(ans)

Submission status: Accepted

Solution code:
N, *L,  = [s.split() for s in open(0)]
N = int(N[0])
cnt = 0
for l in L:
    if l[1] == "JPY":
        cnt += int(l[0])
    else:
        cnt += float(l[0]) * 380000
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0

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

print(ans)

Submission status: Accepted

Solution code:
n = int(input())
lix = []
liv = []
for i in range(n):
    x,v = input().split()
    lix.append(float(x))
    liv.append(v)

ans = 0

for i in range(n):
    if liv[i] == "JPY":
        ans += lix[i]
    else:
        ans += lix[i]*380000

print(ans)

Submission status: Accepted

Solution code:
#coding:utf-8
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)

Submission status: Accepted

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


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

print(cnt)

Submission status: Accepted

Solution code:
n=int(input())
a=[]
for i in range(n):
  x,v=input().split()
  a.append([x,v])
ans=0
for i in range(n):
  if a[i][1]=='BTC':
    ans+=380000*float(a[i][0])
  else:
    ans+=int(a[i][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)

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

print(ans)

Submission status: Accepted

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 += float(x[i][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 == "BTC":
    x = x * 380000.0
  ans += x
print(ans)

Submission status: Accepted

Solution code:
a=int(input())

l=[input().split() for i in range(a)]
for i in range(a):
  if l[i][1]=="JPY":
    l[i]=float(l[i][0])*1
  else:
    l[i]=float(l[i][0])*380000
    

print(sum(l))

Submission status: Accepted

Solution code:
n = int(input())
ans = 0
for _ in range(n):
    x, u = map(str, input().split())
    x = float(x)

    if u == "BTC":
        ans += x*380000
    else:
        ans += 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)
  u = str(u)
  if u == "BTC":
    ans += x*380000.0
  else:
    ans += x

print(ans)

Submission status: Accepted

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

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

print(money)

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy,copy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

def main():
	n = INT()
	xu = [list(input().split()) for _ in range(n)]
	otoshidama = 0
	for x, u in xu:
		if u == 'JPY':
			otoshidama += int(x)
		else:
			otoshidama += float(x) * 380000

	print(otoshidama)

if __name__=='__main__':
	main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
moneys = []
for i in range(n):
    x, y = input().split()
    x = float(x)
    if y == "JPY":
        y = 1.0
    else:
        y = 380000.0
    money = x*y
    moneys.append(money)
print(sum(moneys))

Submission status: Accepted

Solution code:
def t(l_2d):
  return list(zip(*l_2d))
	
	
n = int(input())
a = [list(input().split()) for i in range(n)]
x,u = t(a)
x=map(float,x)



ret=0
for xi,ui in zip(x,u):
	if ui=="JPY":
		ret+=xi
	else:
		ret+=xi*380000
print(ret)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

print(ans)