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(" ")
  if u=="JPY":
    sum+=float(x)
  else:
    sum+=float(x)*380000
print(sum)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# https://qiita.com/_-_-_-_-_/items/34f933adc7be875e61d0
# abcde	s=input()	s='abcde'
# abcde	s=list(input())	s=['a', 'b', 'c', 'd', 'e']
# 5(1つだけ)	a=int(input())	a=5
# 1 2	| x,y = map(int,input().split())   |	x=1,y=2
# 1 2 3 4 5 ... n 　	li = input().split()	li=['1','2','3',...,'n']
# 1 2 3 4 5 ... n 　	li = list(map(int,input().split()))	li=[1,2,3,4,5,...,n]
# FFFTFTTFF 　	li = input().split('T')	li=['FFF', 'F', '', 'FF']

# INPUT
# 3
# hoge
# foo
# bar
# ANSWER
# n=int(input())
# string_list=[input() for i in range(n)]


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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding:utf-8

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
import sys
# import bisect
# import math
# import itertools
# import numpy as np


"""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進数
        """
        # 参考
        # https://blog.rossywhite.com/2018/08/06/bit-search/
        # https://atcoder.jp/contests/abc105/submissions/4088632
        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])
                    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():
    # 1文字に省略
    r, e = range, enumerate
    ip = IP()
    id = Idea()

    """この下から書いてね"""
    n = ip.I()
    ans = 0
    # u = ip.SILS(n)
    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()

Submission status: Accepted

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

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

    print(result)



if __name__ == "__main__":
    main()

Submission status: Accepted

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

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:

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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()
    if u == "JPY":
        x = int(x)
        sum += x
    else:
        x = float(x)
        x = x * 380000
        sum += x
print(sum)

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
  elif u == 'BTC':
    sum_ += x * 380000.0
print(sum_)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#! /usr/bin/python3

# ABC119 B


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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


import sys
import math

#1整数
n = int(input())


#空白区切り2整数
#n ,m = list(map(int, input().split()))

#空白区切りリスト
#a=list(map(int, input().split()))

#s = input().split('/')
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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc119/tasks/abc119_b


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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