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())
ans = 0.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 = []
u = []
for i in range(N):
  x1,u1 = input().split()
  x.append(float(x1))
  u.append(str(u1))
otoshidama = 0.0
for i in range(N):
  if u[i] == "JPY":
    otoshidama += x[i]
  else:
    otoshidama += x[i]*380000.0
print(otoshidama)

Submission status: Accepted

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

anss=0
for kane in kanes:
    if kane[1]=='BTC':
        anss+=float(kane[0])*380000
    else:
        anss+=float(kane[0])

print(anss)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
x=[]
y=[]
for i in range(n):
    a,b=input().split()
    x.append(float(a))
    y.append(b)
for i in range(n):
    if y[i]=='BTC':
        x[i]=x[i]*380000.0
print(sum(x))

Submission status: Accepted

Solution code:
N = int(input())
total_money = 0
for n in range(N):
    number, kind = map(str, input().split())
    if kind == 'JPY':
        total_money += int(number)
    else:
        total_money += float(number)*380000

print(total_money)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def main():
  N = int(input())
  li = [input().strip().split(' ')for _ in range(N)]
  yen = 0.0
  ratio = 380000.0
  for x, u in li:
    if u == 'JPY':
      yen += float(x)
    if u == 'BTC':
      yen += (ratio * float(x))
  print(yen)

  pass

if __name__=='__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
x_list = []
u_list = []
for i in range(N):
    x_u = input().split(' ')
    x_list.append(float(x_u[0]))
    u_list.append(x_u[1])

sum = 0
for x, u in zip(x_list, u_list):
    if u == 'BTC':
        sum += 380000 * x
    elif u == 'JPY':
        sum += x

print(sum)

Submission status: Accepted

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

print(money)

Submission status: Accepted

Solution code:
N = int(input())

ret = 0
for i in range(N):
    x, y = input().split()
    
    if y == "JPY":
        ret += int(x)
    else:
        ret += float(x) * 380000.0

print(ret)

Submission status: Accepted

Solution code:
#B問題
n=int(input())

oto_list=[input().split() for i in range(n)]
cnt = 0

for j in range(n):
    if oto_list[j][1]=="JPY":
        cnt+=float(oto_list[j][0])
    else:
        cnt+=380000.0 * float(oto_list[j][0])
print(cnt)

Submission status: Accepted

Solution code:
N=int(input())

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

print(ans)

Submission status: Accepted

Solution code:
N = int(input())

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

    if u == 'JPY':
        ans += int(x)
    else:
        ans += float(x) * 380000.0
print(ans)

Submission status: Accepted

Solution code:
n = int(input())

total = 0
for _ in range(n):
    x, u = input().split()
    x = float(x)
    if u == 'BTC':
        x = 380000.0 * x
    total += x
print(total)

Submission status: Accepted

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

    ans = 0
    for ai in a:
        x = ai[0]
        u = ai[1]
        if u == "JPY" :
            ans += x
        else:
            ans += 380000 * x

    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
table = np.array([[i for i in input().split()] for _ in range(N)])

vals = table[:, 0].astype(float)
conts = table[:, 1]

rates = (conts == "JPY") * 1 + (conts == "BTC") * 380000
s = (vals * rates).sum()
print(s)

Submission status: Accepted

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


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

print(ans)

Submission status: Accepted

Solution code:
n = int(input())
values = []
for i in range(n):

	values.append(input().split())

total = 0
for value in values:
	if value[1] == "JPY":
		total += int(value[0])
	if value[1] == "BTC":
		total += float(value[0]) * 380000.0

print(total)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

m = 0

for i in range(N):
    a = input().rstrip().split(" ")
    x = float(a[0])
    u = a[1]    #jpy or btc
    
    if u == "JPY":
        m += x
    else:
        m += x * 380000.0

print(m)

Submission status: Accepted

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

def solve():
    value = 0
    for i in range(N):
        if(u[i]=='BTC'):
            value = value + x[i]*380000.0
        else:
            value = value + x[i]
    return value
print(solve())

Submission status: Accepted

Solution code:
import sys,collections,math;sys.setrecursionlimit(10**7)
def Is(): return [int(x) for x in sys.stdin.readline().split()]
def Ss(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

n = I()
ans = 0
for i in range(n):
    v,c = Ss()
    m = 1
    if c == "BTC":
        m = 380000
    ans += float(v)*m
print(ans)

Submission status: Accepted

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

res = 0

for x,u in in_num:
    if u == 'JPY':
        res+=float(x)
    else:
        res+= float(x)*380000.0

print(res)

Submission status: Accepted

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

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=="BTC":
    ans+=a*380000
  elif b=="JPY":
    ans+=a
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

print(count)

Submission status: Accepted

Solution code:
N = int(input())
x = 0.0

for i in range(N):
    t1, t2 = input().split(" ")
    if t2 == "BTC":
        t1 = float(t1) * 380000.0
    else:
        t1 = float(t1)
    x += t1

print(x)

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)

s = 0

for i in range(N):
    if u[i] == "JPY":
        s += x[i]
    elif u[i] == "BTC":
        s += x[i] * 380000

print(s)

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

Submission status: Accepted

Solution code:
N=int(input())
ans=0
for i in range(N):
  s,t=input().split()
  if t[0]=="J":
    ans+=int(s)
  else:
    ans+=float(s)*380000
print (ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Feb 16 20:52:46 2019

@author: Owner
"""


import collections
import scipy.misc
import sys
import numpy as np
import math
from operator import itemgetter
import itertools
import copy

#素因数を並べる
def prime_decomposition(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n /= i
      table.append(int(i))
    i += 1
  if n > 1:
    table.append(int(n))
  return table   
# 桁数を吐く
def digit(i):
    if i > 0:
        return digit(i//10) + [i%10]
    else:
        return []
    
def getNearestValueIndex(list, num):
    """
    概要: リストからある値に最も近い値のインデックスを取得する関数
    @param list: データ配列
    @param num: 対象値
    @return 対象値に最も近い値
    """

    # リスト要素と対象値の差分を計算し最小値のインデックスを取得
    idx = np.abs(np.asarray(list) - num).argmin()
    return idx

"""
N, X = map(int, input().split())

x = [0]*N
x[:] = map(int, input().split())

P = [0]*N
Y = [0]*N
for n in range(N):
    P[n], Y[n] = map(int, input().split())
    
all(nstr.count(c) for c in '753')

# 複数配列を並び替え
ABT = zip(A, B, totAB)
result = 0
# itemgetterには何番目の配列をキーにしたいか渡します
sorted(ABT,key=itemgetter(2))
A, B, totAB = zip(*ABT)
A.sort(reverse=True)

# 2進数のbit判定
(x >> i) & 1

# dp最小化問題
dp = [np.inf]*N
for n in range(N):
    if n == 0:
        dp[n] = 0
    else:
        for k in range(1,K+1):
            if n-k >= 0:
                dp[n] = min(dp[n], dp[n-k] + abs(h[n]-h[n-k]))
            else:
                break

"""

N = int(input())

x = [0]*N
u = [0]*N
result = 0
for n in range(N):
    x[n], u[n] = map(str, input().split())
    if u[n] == 'JPY':
        result += float(x[n])
    else:
        result += 380000.0*float(x[n])    
print(result)

Submission status: Accepted

Solution code:
N = int(input())
si = 0
sf = 0.0
for i in range(N):
    xs, us = input().split()
    if us == 'JPY':
        si += int(xs)
    else:
        sf += float(xs) * 380000.0

print(si + sf)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

BTC = 380000.0


def main():
  n = int(input())
  gains = [tuple(input().split()) for _ in range(n)]
  rewards = [float(v) if u == 'JPY' else float(v) * BTC for v, u in gains]

  print('{:.5f}'.format(sum(rewards)))


if __name__ == '__main__':
  main()

Submission status: Accepted

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

print(res)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=input()
result=0
for dummy in range(0,int(a)):
  str=input()
  str=str.split(' ')
  if(str[1]=='JPY'):
    k=1.0
  else:
    k=380000.0
  result+=float(str[0])*k

print(result)

Submission status: Accepted

Solution code:
ans = 0
n = int(input())
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())
#print(n)
otosilist=[]
for nth in range(n):
    okane=input().split(' ')
    otosilist.append([okane[0], okane[1]])

#print(otosilist)
money=0

for olist in otosilist:
    if olist[1]=='JPY':
        money+=float(olist[0])
    else:
        money+=float(olist[0])*380000.0

print(money)

Submission status: Accepted

Solution code:
from functools import reduce
from operator import add

def solve():
  N = int(input())
  M = [0] * N
  for i in range(N):
    x, u = input().split()
    if u == 'JPY':
      M[i] = int(x)
    else:
      M[i] = float(x) * 380000.0
  return reduce(add, M)

print(solve())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin
 
sys.setrecursionlimit(10**7) 
 
def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())
 
N = int(input())

ans = 0
for i in range(N):
    temp = input().split(" ")
    x = float(temp[0])
    u = temp[1]
    if u == 'BTC':
        x = x * 380000
    ans += x

print(ans)

Submission status: Accepted

Solution code:
N = int(input())

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


print(s)

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

Submission status: Accepted

Solution code:
from sys import stdin

n = int(stdin.readline().strip())
ans = 0
for _ in range(n):
    x, u = stdin.readline().strip().split()
    if u == 'JPY':
        ans += int(x)
    if u == 'BTC':
        ans += 380000.0 * float(x)
print(ans)

Submission status: Accepted

Solution code:
ans = 0
for i in range(int(input())):
    a, b = input().split()
    ans += float(a) * (1 if b[0] == 'J' else 380000)
print('%.6f' % ans)

Submission status: Accepted

Solution code:
n=int(input())
rate=380000.0

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

Submission status: Accepted

Solution code:
N = int(input())
X = [tuple(input().split()) for _ in range(N)]
ans = 0
for x, u in X:
    x = float(x)
    if u == 'BTC':
        x *= 380000
    ans += x

print(ans)

Submission status: Accepted

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

from collections import deque
import heapq
import math
import bisect


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

    print(S)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
result = 0.0
for i in range(N):
  x,t = input().rstrip().split(" ")
  if t == "JPY":
    result += float(x)
  else:
    result += float(x)*380000.0
print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def btc2jpy(price):
    return 380000. * price

N = int(input())
sum_ = 0
for i in range(N):
    elms = input().split(" ")
    if elms[1] == "BTC":
        x = btc2jpy(float(elms[0]))
    else:
        x = int(elms[0])
    sum_ += x

print(sum_)

Submission status: Accepted

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

N = int(input())
X, U = [], []
sm = 0.0
RATE = 380000.0

for i in range(N):
    x, u = input().split()
    if u == "JPY":
        x = int(x)
        sm += x
    elif u == "BTC":
        x = float(x)
        sm += RATE * x
    else:
        raise ValueError("")

    X.append(x)
    U.append(u)

print(sm)

Submission status: Accepted

Solution code:
N = int(input())
ans = 0.0
for i in range(N):
    nums = input().split()
    if nums[1] == 'BTC':
        ans += 380000.0 * float(nums[0])
    else:
        ans += float(nums[0])
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
money = []
unit = []
for i in range(n):
    a, b = map(str, input().split())
    money.append(float(a))
    unit.append(b)
    
total = 0
for i in range(len(unit)):
    if unit[i] == "JPY":
        total += money[i]
    else:
        total += money[i] * 380000.0

print(total)

Submission status: Accepted

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

N = int(input())
ans = 0.0

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

Submission status: Accepted

Solution code:
n=int(input())
ans=0
for i in range(n):
    a,b=map(str,input().split())
    if b=="JPY": ans+=float(a)
    else: ans+=float(a)*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)
    elif u == "BTC":
        total += float(x) * 380000.0

print(total)

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0.0 
for i in range(N):
    x = float(XU[i][0])
    u = XU[i][1]
    if u == 'JPY':
        ans += x
    else:
        ans += x * 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+=x*380000.0
print(ans)

Submission status: Accepted

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

def main():
	N = int(input())
	japan = 0
	bitcoin = 0.0
	for _ in range(N):
		X = input().split()
		if X[1] == 'JPY':
			japan += int(X[0])
		else:
			bitcoin += float(X[0])
	print(japan + bitcoin * 380000.0)

if __name__ == '__main__':
	main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
 
v = []
for line in sys.stdin:
    v.append([i for i in line.split()])
 
m = 0
for a, b in v[1:]:
  a = float(a)
  if b == "JPY":
    m += a
  else:
    m += 380000.0 * a
print(m)

Submission status: Accepted

Solution code:
from sys import stdin

def main():
    N = int(input())
    XU = [input().split() for _ in [0] * N]

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

input = lambda: stdin.readline().rstrip()
main()

Submission status: Accepted

Solution code:
# coding: utf-8
N = int(input())
ans = 0
for _ in range(N):
    p, q = input().split()
    if q == 'JPY':
        ans += float(p)
    else:
        ans += float(p) * 380000.0
print(ans)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
BTC = 380000
ans = 0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#119-B
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(input())
def S(): return input()
n=I()
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:
# -*- coding: utf-8 -*-
from decimal import *
n = int(input())

res1 = Decimal(0)
res2 = Decimal(0)
for _ in range(n):
    x,u = input().split()
    if u=="JPY":
        res1 += Decimal(x)
    else:
        res2 += Decimal(x)*Decimal(380000.0)

print(res1+res2)

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:
import sys
N = int(input())
total = 0 
for i in range(N):
    x, u = input().split()
    if u == 'JPY':
        total += float(x)
    if u == 'BTC':
        total += float(x) * 380000.0
print(total)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

ans = 0.0

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

print(ans)

Submission status: Accepted

Solution code:
N = int(input())
ans = 0.00000000
for i in range(N):
  x, u = input().split()
  if u == "BTC":
    ans += float(x) * 3.8 * (10**5)
  else:
    ans += float(x)
print(ans)

Submission status: Accepted

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

print(m)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

x = []

for i in range(N):
    X, U = list(map(str, input().split()))
    if U == 'BTC':
        X = float(X) * 380000.0
    x.append(float(X))

print(sum(x))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import math
import sys

n = int(sys.stdin.readline().rstrip())
ans = 0.0
for _ in range(n):
  x, u = list(map(str, sys.stdin.readline().rstrip().split()))
  if u == "JPY":
    ans += float(x)
  elif u == "BTC":
    ans += float(x) * 380000

print(ans)

Submission status: Accepted

Solution code:
import sys
from collections import deque
import copy
import math
def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline

def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    [N] = [int(input_raw[0])]
    s = 0
    for i in range(N):
        input_raw = read_func().strip().split()
        [x, u] = [float(input_raw[0]), (input_raw[1])]
        if u == "JPY":
            s += x
        else:
            s += x *380000.0
    print s




if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

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

BTC=380000.0
total=0

for i in otoshidama:
  if i[1]=='BTC':
    total+=float(i[0])*BTC
  else:
    total+=float(i[0])

print(total)

Submission status: Accepted

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

Submission status: Accepted

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

m = 0

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

print(m)

Submission status: Accepted

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

ans=0.0

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

print(ans)

Submission status: Accepted

Solution code:
import sys
# A,B,C = [int(n) for n in input().split()]
N = int(input())
x = [0]*N
u = [0]*N
ans = 0
for i in range(N):
    x[i],u[i] = [n for n in input().split()]
    if(u[i] == "JPY"):
        ans += float(x[i])
    else:
        ans += float(x[i])*380000

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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


if __name__ == '__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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