Problem:
 Score : 200 points    Problem Statement Takahashi received otoshidama (New Year's money gifts) from N of his relatives.  You are given N values x_1, x_2, ..., x_N and N strings u_1, u_2, ..., u_N as input. Each string u_i is either JPY or BTC , and x_i and u_i represent the content of the otoshidama from the i -th relative.  For example, if x_1 =  10000 and u_1 =  JPY , the otoshidama from the first relative is 10000 Japanese yen; if x_2 =  0.10000000 and u_2 =  BTC , the otoshidama from the second relative is 0.1 bitcoins.  If we convert the bitcoins into yen at the rate of 380000.0 JPY per 1.0 BTC, how much are the gifts worth in total?      Constraints  2 \leq N \leq 10  u_i =  JPY or BTC .  If u_i =  JPY , x_i is an integer such that 1 \leq x_i \leq 10^8 .  If u_i =  BTC , x_i is a decimal with 8 decimal digits, such that 0.00000001 \leq x_i \leq 100.00000000 .         Input Input is given from Standard Input in the following format:  N  x_1  u_1  x_2  u_2  :  x_N  u_N       Output If the gifts are worth Y yen in total, print the value Y (not necessarily an integer).  Output will be judged correct when the absolute or relative error from the judge's output is at most 10^{-5} .        Sample Input 1 2
10000 JPY
0.10000000 BTC      Sample Output 1 48000.0  The otoshidama from the first relative is 10000 yen. The otoshidama from the second relative is 0.1 bitcoins, which is worth 38000.0 yen if converted at the rate of 380000.0 JPY per 1.0 BTC. The sum of these is 48000.0 yen.  Outputs such as 48000 and 48000.1 will also be judged correct.       Sample Input 2 3
100000000 JPY
100.00000000 BTC
0.00000001 BTC      Sample Output 2 138000000.0038  In this case, outputs such as 138001000 and 1.38e8 will also be judged correct.

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

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

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

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

print(Y)

Solution (Python):
def main():
    N = int(input())
    total = 0.
    
    for _ in range(N):
      x, u = input().split()
      if u == 'JPY':
        total += int(x)
      else:
        total += float(x) * 380000.0

    print(total)

    
if __name__ == '__main__':
    main()

Solution (Python):



















from collections import defaultdict, Counter
import math
from bisect import bisect_left, bisect_right
import numpy as np

N = int(input())
x = []
u = []

for _ in range(N):
    li = input().split()
    x.append(float(li[0]))
    u.append(li[1])

ans = 0
for x_i, u_i in zip(x, u):
    if u_i == "JPY":
        ans += x_i
    else:
        ans += x_i*380000.0

print(ans)

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

Solution (Python):

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

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

xu = []
for i in range(N):
  xu.append(list(input().split()))

Ans = 0
for i in xu:
  if i[1] == "JPY":
    Ans += float(i[0])
  else:
    Ans += float(i[0]) * 380000

print(Ans)

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

s = 0
r = 380000.0
for x, u in zip(X, U):
    if u == 'JPY':
        s += x
    else:
        s+= x*r
print(s)

Solution (Python):
N = int(input())
L = [ list(map(str, input().split())) for _ in range(N)]

res = 0
for l in L:
    if l[1] == 'JPY':
        res += float(l[0])
    else:
        res += 380000.0 * float(l[0])
        
print(res)

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

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

total = 0
rate = 380000.0

for _ in range(n):
  x,y = input().split()
  
  if y == "JPY":
    total += int(x)
  else:
    print
    total += (float(x)*rate)
print(total)

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

Solution (Python):
g = 0
for _ in range(int(input())):
    X = input().split()
    m = float(X[0])
    u = X[1]
    if u == 'JPY':
        g += m
    else:
        g += m * 380000.0
print(g)

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

print(res)

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

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

print(summon)

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

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

Solution (Python):


import decimal


BTC2JPY = 380000


def main():
    n = int(input())
    s = 0
    for _ in range(n):
        x0, u = input().split()
        x = decimal.Decimal(x0)
        if u == "BTC":
            x *= BTC2JPY
        s += x
    print(s)


if __name__ == "__main__":
    main()

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

for i in range(n):
    x,u = [y for y in input().split(' ')]
    if u == 'JPY':
        result += float(x)
    elif u == 'BTC':
        result += 380000.0 * float(x)

print(str(result))

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

Solution (Python):
BTC = 380000
[n] = [int(i) for i in input().split()]

sum = 0
for i in range(0, n):
    [x, u] = [i for i in input().split()]
    if u == "JPY":
        sum = sum + int(x)
    elif u == "BTC":
        sum = sum + float(x) * BTC

print(sum)

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

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

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

print(sum)

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

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

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

otoshidama = 0
for n in range(line):
    part = input().split()
    if part[1] == "JPY":
        otoshidama += int(part[0])
    else:
        otoshidama += float(part[0]) * 380000

print(otoshidama)

Solution (Python):
N = int(raw_input())
otoshidama = [raw_input().split() for _ in range(N)]
ans = 0.
for o in otoshidama:
  if o[1] == "JPY":
    ans += float(o[0])
  else:
    ans += float(o[0]) *380000.0
print ans

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

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)

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

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

Solution (Python):
rate = 380000.0
sum_jpy = 0.0

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

print(sum_jpy)

Solution (Python):
N=input()

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

print ans

Solution (Python):


N = int(input())

x = []
u = []

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

sum_ = 0

for i in range(N):
    if u[i] == 'JPY':
        sum_ += x[i]
    else:
        sum_ += x[i] * 380000

print(sum_)

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

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

print(ans)

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

print(sum)

Solution (Python):

import sys






"""Template"""


class IP:
    """
    入力を取得するクラス
    """

    def __init__(self):
        self.input = sys.stdin.readline

    def I(self):
        """
        1文字の取得に使います
        :return: int
        """
        return int(self.input())

    def S(self):
        """
        1文字の取得(str
        :return: str
        """
        return self.input()

    def IL(self):
        """
        1行を空白で区切りリストにします(int
        :return: リスト
        """
        return list(map(int, self.input().split()))

    def SL(self):
        """
        1行の文字列を空白区切りでリストにします
        :return: リスト
        """
        return list(map(str, self.input().split()))

    def ILS(self, n):
        """
        1列丸々取得します(int
        :param n: 行数
        :return: リスト
        """
        return [int(self.input()) for _ in range(n)]

    def SLS(self, n):
        """
        1列丸々取得します（str
        :param n: 行数
        :return: リスト
        """
        return [self.input() for _ in range(n)]

    def SILS(self, n):
        """
        Some Int LineS
        横に複数、縦にも複数
        :param n: 行数
        :return: list
        """
        return [self.IL() for _ in range(n)]

    def SSLS(self, n):
        """
        Some String LineS
        :param n: 行数
        :return: list
        """
        return [self.SL() for _ in range(n)]


class Idea:
    def __init__(self):
        pass

    def HF(self, p):
        """
        Half enumeration
        半分全列挙です
        pの要素の和の組み合わせを作ります。
        ソート、重複削除行います
        :param p: list : 元となるリスト
        :return: list : 組み合わせられた和のリスト
        """
        return sorted(set(p[i] + p[j] for i in range(len(p)) for j in range(i, len(p))))

    def Bfs2(self, a):
        """
        bit_full_search2
        bit全探索の改良版
        全探索させたら2進数のリストと10進数のリストを返す
        :return: list２つ : １個目 2進数(16桁)  2個目 10進数
        """
        
        
        
        value = []
        for i in range(1 << len(a)):
            output = []

            for j in range(len(a)):
                if self.bit_o(i, j):
                    """右からj+1番目のiが1かどうか判定"""
                    
                    output.append(a[j])
            value.append([format(i, 'b').zfill(16), sum(output)])

        value.sort(key=lambda x: x[1])
        bin = [value[k][0] for k in range(len(value))]
        val = [value[k][1] for k in range(len(value))]
        return bin, val

    def S(self, s, r=0, m=-1):
        """
        ソート関係行います。色々な設定あります。
        :param s: 元となるリスト
        :param r: reversするかどうか 0=False 1=True
        :param m: （2次元配列）何番目のインデックスのソートなのか
        :return: None
        """
        r = bool(r)
        if m == -1:
            s.sort(reverse=r)
        else:
            s.sort(reverse=r, key=lambda x: x[m])

    def bit_n(self, a, b):
        """
        bit探索で使います。0以上のときにTrue出します
        自然数だからn
        :param a: int
        :param b: int
        :return: bool
        """
        return bool((a >> b & 1) > 0)

    def bit_o(self, a, b):
        """
        bit探索で使います。1のときにTrue出すよ
        oneで1
        :param a: int
        :param b: int
        :return: bool
        """
        return bool(((a >> b) & 1) == 1)

    def ceil(self, x, y):
        """
        Round up
        小数点切り上げ割り算
        :param x: int
        :param y: int
        :return: int
        """
        return -(-x // y)

    def ave(self, a):
        """
        平均を求めます
        :param a: list
        :return: int
        """
        return sum(a) / len(a)

    def gcd(self, x, y):
        if y == 0:
            return x
        else:
            return self.gcd(y, x % y)


"""ここからメインコード"""


def main():
    
    r, e = range, enumerate
    ip = IP()
    id = Idea()

    """この下から書いてね"""
    n = ip.I()
    ans = 0
    
    for _ in r(n):
        x = ip.SL()
        u = x[1]
        x = float(x[0])
        if u == "JPY":
            ans += x
        else:
            ans += 380000 * x

    print(ans)


main()

Solution (Python):
import math, string, itertools, fractions, heapq, collections, re,  array, bisect, sys, random, time, copy, functools


sys.setrecursionlimit(10**7)
inf = 10 ** 20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]


def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    N = I()
    XU = []
    for i in range(N):
        x, u = LS()
        XU.append([float(x), u])

    
    result = 0
    for x, u in XU:
        if u == 'JPY':
            result += x
        else:
            result += x * 380000

    print(result)



if __name__ == "__main__":
    main()

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

Solution (Python):

def f(S):
	x,u = S.split(" ")
	x = float(x)
	return x if u=="JPY" else x*380000.0
	

def main():
	N = input()
	print sum(f(raw_input()) for _ in range(N))
	
	return 0

if __name__ == '__main__':
	main()

Solution (Python):
N = int(input())
ans = 0
for lop in range(N):
    data = input().split()
    x = float(data[0])
    u = data[1]
    if u == "JPY":
        ans += x
    else:
        ans = ans + (x * 380000)

print(ans)

Solution (Python):
n=int(input())
h=[]
m=0
for i in range(n):
    h.append(list(map(str,input().split())))
    if h[i][1]=="JPY":
        m+=int(h[i][0])
    else:
        m+=float(h[i][0])*380000.0
print(m)

Solution (Python):
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))

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

print(ans)

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

A = []
for i in range(N):
    A.append(list(input().split()))

ans = 0
for a in A:
    if a[1] == 'JPY':
        ans += float(a[0])
    else:
        ans += float(a[0]) * 380000.0

print(ans)

Solution (Python):
N = int(input())
otosi = 0
for i in range(N):
    xi, ui = list(map(str, input().split()))
    xi = float(xi)
    if ui == "JPY":
        otosi += xi
    else:
        otosi += 380000.0 * xi
print(otosi)

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

Solution (Python):
n = int(input())
btc = 380000
ans = 0
for i in range(n):
  c, d = (input().split())
  if d == 'JPY': ans += float(c)
  else: ans += float(c)*btc
print(ans)

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

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

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

print(sum([float(x)*{"JPY": 1, "BTC": 380000}[u] for x, u in XU]))

Solution (Python):

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):





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

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

sum = 0

for i in range(n):
    v, kind = input().split()
    v = float(v)
    if kind == "JPY":
        sum += v
    else:
        sum += v * 380000

print(sum)

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

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

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

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

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

print(sum)

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

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

print(sum)

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

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

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

Solution (Python):

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

print(res)

Solution (Python):
N = int(input())
cnt = 0
for i in range(N):
  x, v = input().split()
  cnt += float(x) * (380000.0 if v == 'BTC' else 1.0)
print(cnt)

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

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

Solution (Python):
data = input().split()  
n = int(data[0])
sum = 0.0

for i in range(n):
    tmp = input().split()
    tmp2 = float(tmp[0])
    if(tmp[1] == 'BTC'):
        sum += (380000.0*tmp2)
    else:
        sum += tmp2

print(sum)

Solution (Python):




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


if __name__ == '__main__':
    main()

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

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

Solution (Python):
N = int(input())
ans = 0.0
for i in range(N):
    x,u = input().split()
    if u == "JPY":
        ans += int(x)
    else:
        ans += 380000.0 * float(x)
print("%.4f" % ans)

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

Solution (Python):

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

N = int(input())
ans = 0
rate = [1, 380000]

for _ in range(N):
    x, u = input().split()
    ans += float(x) * rate[u == "BTC"]
print(ans)

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

print(ans)

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

Solution (Python):



import sys
import math


n = int(input())









list=[]
sum = 0.0
for i in range(n):
    s = input().split()
    if s[1] == 'JPY':
        sum += int(s[0])
    else:
        sum += float(s[0])*380000.0

print(sum)

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

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

print(s)

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

ans = 0

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

print(ans)

Solution (Python):
BTC_2_YEN = 380000

N = int(input())

ans = 0
for _ in range(N):
    x, u = input().split()
    x = float(x)

    if u == 'JPY':
        ans += x
    else:
        ans += x * BTC_2_YEN
print(ans)

Solution (Python):


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

Solution (Python):
n = input()

ans = 0
for _ in xrange(n):
    x, u = raw_input().strip().split()
    x = float(x)

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

print "{0:.9f}".format(ans)

Solution (Python):
n = int(input())
otoshidama = [input().split() for _ in range(n)]
money = 0
for f, typ in otoshidama:
    if typ == 'JPY':
        money += int(f)
    else:
        money += float(f) * 380000
print(money)

Solution (Python):

"""
This file is part of https://github.com/cheran-senthil/PyRival
Copyright 2019 Cheran Senthilkumar <hello@cheran.io>

"""
from __future__ import division, print_function

import itertools
import os
import sys
from atexit import register
from io import BytesIO


class dict(dict):
    """dict() -> new empty dictionary"""

    def items(self):
        """D.items() -> a set-like object providing a view on D's items"""
        return dict.iteritems(self)

    def keys(self):
        """D.keys() -> a set-like object providing a view on D's keys"""
        return dict.iterkeys(self)

    def values(self):
        """D.values() -> an object providing a view on D's values"""
        return dict.itervalues(self)


def gcd(x, y):
    """greatest common divisor of x and y"""
    while y:
        x, y = y, x % y
    return x


range = xrange

filter = itertools.ifilter
map = itertools.imap
zip = itertools.izip

sys.stdin = BytesIO(os.read(0, os.fstat(0).st_size))
sys.stdout = BytesIO()
register(lambda: os.write(1, sys.stdout.getvalue()))

input = lambda: sys.stdin.readline().rstrip('\r\n')


def main():
    n = int(input())
    t = 0.0
    for i in range(n):
        x, u = input().split()
        if u == 'BTC':
            t += float(x) * 380000
        else:
            t += int(x)
    print(t)


if __name__ == '__main__':
    main()

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

result = 0
for i in range(n):
    x, p = input().split()
    x = float(x)

    if p == "JPY":
        result += x
    else:
        result += x * 380000.0
print(result)

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

total = 0

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

print(total)

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

ans = 0.0
for i in range(n):
    amt, kind = input().split()
    amount = float(amt)
    if kind == 'JPY':
        ans += amount
    else:
        ans += amount * 380000.0
print(ans)

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

print(ans)

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

money = 0

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

    if u == 'BTC':
        money += x * 380000.0
    else:
        money += x

print(money)

Solution (Python):
n = int(input().strip())
btc2jpy = 380000
jpy_total = 0
btc_total = 0.0
for _ in range(n):
    line = input().strip().split()
    if line[1] == 'JPY':
        jpy_total += int(line[0])
    else:
        btc_total += float(line[0])
print(jpy_total + btc2jpy * btc_total)

Solution (Python):
import sys
import datetime

def main():
    ans = 0.0

    _ = sys.stdin.readline()
    for line in sys.stdin:
        line = line.rstrip()
        lst = line.split()

        x = float(lst[0])
        u = lst[1]

        if u == 'JPY':
            ans += x
        elif u == 'BTC':
            ans += x * 380000.0
        else:
            pass

    print(ans)

    return 0

if __name__ == '__main__':
    sys.exit(main())

Solution (Python):



def main():
    btc = 380000
    N = int(input())
    total = 0
    for _ in range(N):
        a, b = input().split()
        if b == "JPY":
            total += float(a)
        else:
            total += (float(a) * btc)
    print(total)

if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
items = []
for i in range(N):
    x, u = input().split()
    items.append((float(x),u))
bp = 380000.0

ans = 0

for x, u in items:
    if u == "JPY":
        ans += x
    else:
        ans += bp * x
print(ans)

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

Solution (Python):
n = int(input())
X = [[i for i in input().split()] for j in range(n)]

ans = 0

for x, u in X:
    x = float(x)
    if u == 'BTC':
        x *= 380000
    ans += x

print(ans)

Solution (Python):
from statistics import mean, median,variance,stdev
import numpy as np
import sys
import math
import fractions
import itertools

def j(q):
    if q==1: print("Heisei")
    else:print("TBD")
    exit(0)


def ct(x,y):
    if (x>y):print("")
    elif (x<y): print("")
    else: print("")

def ip():
    return int(input())

def swap(s,pos):
    s[pos]-=1
    s[pos+1]+=1
    print(s)
    if pos == n-2: return s
    if s[pos+2] == 0: swap(s,pos+1)
    return s


n = ip()                              











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

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

Solution (Python):


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

print(ans)

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

result = 0
for i in range(N):
    x, u = [i for i in input().split()]
    if u == "JPY":
        result += float(x)
    if u == "BTC":
        result += float(x) * 380000.0

print("{:.5f}".format(result))

Solution (Python):
def inpl():
    return list(map(int, input().split()))


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

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

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

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

Solution (Python):

import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

N = int(input())

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

Solution (Python):
n = int(input())
y = [tuple(input().split()) for _ in range(n)]
j = 0
for i in range(n):
    if y[i][1] == "JPY":
        j += float(y[i][0])
    else:
        j += float(y[i][0])*380000.0
print(j)

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

print(res)

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

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

print(ret)

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

print(suma)