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: Runtime Error

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

n = ri()
ans = 0
for _ in range(n):
  a, b = rs()
  if b == 'JPY':
    ans += float(a)
  else:
    ans += float(a)*380000
pritn(ans)

Submission status: Runtime Error

Solution code:
from decimal import Decimal
n=int(input())
ans=0
for in range(n):
    x,y=map(str,input().split())
    if y=="BTC":
        ans+=Decimal(380000*Decimal(x))
    else:
        ans+=Decimal(x)
print(ans)

Submission status: Runtime Error

Solution code:
n = int(raw_input())
q= 0 
for _ in range(n):
  	u,v = raw_input().split(' ')
    u = float(u)
    h = {'BTC':380000.0, 'JPY':1.0}
    q += u * h[v]
print q

Submission status: Runtime Error

Solution code:
n = int(raw_input())
q= 0 
for _ in range(n):
  	u,v = raw_input().split(' ')
    u = int(u)
    h = {'BTC':380000.0, 'JPY':1.0}
    q += u * h[v]
print q

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
// Begin Header {{{
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using Graph = vector<vector<ll>>;
#define rep(i,n) for(ll i=0; i<n; i++)
#define loop(i, j, n) for(ll i=j; i<n; i++)
#define all(x) (x).begin(), (x).end()
constexpr int INF  = 0x3f3f3f3f;
const long long mod=1e9+7;
const long double PI = acos(-1);
// }}} End Header

int main() {
	int n;
	double ans=0;
	cin >> n;
	rep(i,n){
		double x; string s;
		cin >> x >> s;
		if(s == "JPY") ans+=x;
		else ans+=380000*x;
	}
	printf("%.15f", ans);
	return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
x = []
u = []
sum = 0.0
for i in range(n):
    tmp1, tmp2 = input().split()
    x.append(int(tmp1))
    u.append(tmp2)
    if u[i] == "JPY":
        sum += x[i]
    else:
        sum += int(x[i] * 380000)

print(sum)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll,ll>;
using vl = vector<ll>;
using Map = map<ll,ll>;
using T = tuple<ll,ll,ll>;
using vvl = vector<vector<ll>>;
#define all(v) v.begin(), v.end()
#define print(v) cout<<v<<endl;
#define fi(v) get<0>(v)
#define se(v) get<1>(v)
#define th(v) get<2>(v)
template <typename T> bool chmax(T &a, const T &b){if (a<b){a=b;return 1;}return 0;}
template <typename T> bool chmin(T &a, const T &b){if (a>b){a=b;return 1;}return 0;}
const ll INF=1LL<<60;
const ll MOD=1000000007;


int main(){
    ll N;
    cin >> N;
    vector<double> x(N,0);
    vector<string> u(N);
    for(ll i=0;i<N;i++)cin>>x[i]>>u[i];
    double sum=0;
    for(ll i=0;i<N;i++){
        if(u[i]=="JPY")sum+=x[i];
        else sum+=x[i]*380000;
    }

    cout << fixed << setprecision(10);
    print(sum)

    return 0;
}

Submission status: Runtime Error

Solution code:
N = int(Input())
x,u = [""]*N
for i in range(N):
  x[i],u[i] = input().split()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())

ans = 0
for n in range(N):
  x, t = input().split()
  if t == "BTC":
    ans += x*380000.0
  else:
    ans += x
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
money = 0
for _ in range(n):
  p = input().split()
  if p[1] == 'JPY':
    money += int(p[0])
  elif p[1] == 'BTC':
    money += int(p[0]) * 380000

print(money)

Submission status: Runtime Error

Solution code:
n = int(input())
money = 0
for _ in range(n):
  p = input().split()
  if p[1] == 'JPY':
    money += int(p[0])
  elif p[1] == 'BTC':
    money += int(p[0]) * 380000.0

print(money)

Submission status: Runtime Error

Solution code:
# ABC119B

n = int(input())

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

Submission status: Runtime Error

Solution code:
# ABC119B

n = int(input()

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

Submission status: Runtime Error

Solution code:
n = int(input()

z = 0
for i in range(len(xu)):
    x, y = input().split()
    x = int(x)
    if y == 'JPY':
        z += x
    else:
        z += x*380000
print(z)

Submission status: Runtime Error

Solution code:
 = int(input()

z = 0
for i in range(len(xu)):
    x, y = input().split()
    x = int(x)
    if y == 'JPY':
        z += x
    else:
        z += x*380000
print(z)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
ans = 0
for _ in n:
  m,t = input().split()
  m = float(m)
  if t == 'JPY':ans+=m
  else:ans+= m*380000.0
print(ans)

Submission status: Runtime Error

Solution code:
def kansan(a,b):
  if b=="BTC":
    return a*380000
  else:
    return a

n=int(input())
total = 0
for i in range(n):
  a,b=map(str, input().split())
  total = total + kansan(int(a),b)
print(total)

Submission status: Runtime Error

Solution code:
N = int(input())
money = []
type = []
for i in range(N):
    m, t = input().split()
    money.append(int(m))
    type.append(t)
    
sum = 0
for i in range(N):
    if type[i] == 'JPY':
        sum += money[i]
    else :
        sum += money[i]*3.8*10**5
print(sum)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
t=0
for i in range(n):
  x,y=input().split()
  if y=='JPN':
    t+=x
  else:
    t+=x*380000
print(t)

Submission status: Runtime Error

Solution code:
n=int(input())
k=0
b=0
for i in range(n):
  x,u=input().split()
  x=float(x)

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

Submission status: Runtime Error

Solution code:
print(eval("".join(open(0).readlines()[1:]).replace(" JPY", "").replace(" BTC","*380000").replace("\n", "+")))

Submission status: Runtime Error

Solution code:
import numpy as np
import sys

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

Submission status: Runtime Error

Solution code:
def main():
    N = int(input())
    rate = 380000
    jpy = 0
    bit = 0
    for _ in range(N):
        x, u = input().split()
        if u=='JPY':
            jpy += x
        else:
            bit += x
    print(jpy + bit*rate)
main()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define mfill(x,y) memset(x,y,sizeof(x))
#define all(v) v.begin(), v.end()
#define in(x,y,h,w) if(0<=x&&x<h&&0<=y&&y<w)
#define y0 y12345
#define y1 y54321

#ifdef LOCAL
#define debug(...) fprintf(stderr,__VA_ARGS__)
#else
#define debug(...) 42
#endif

using ul = unsigned long;
using ll = long long;
using P = pair<int, int>;
using vint = vector<int>;using vvint = vector<vector<int>>;
using vll = vector<ll>;using vvll = vector<vector<ll>>;
template<class T>bool chmax(T &a, const T &b){if(a<b){a=b;return 1;}return 0;}
template<class T>bool chmin(T &a, const T &b){if(a>b){a=b;return 1;}return 0;}
template <class T>void initvv(vector<vector<T> > &v, int a, int b, const T &t = T()){
    v.assign(a, vector<T>(b, t));
}
template <class T>T gcd(T &a, T &b){if(a<b){swap(a,b);} T r = a%b; while(r!=0){a=b;b=r;r=a%b;} return b;}

vint dx = {-1, 0, 1, 0}, dy = {0, -1, 0, 1};
vint dx8 = {-1, -1, -1, 0, 1, 1, 1, 0}, dy8 = {-1, 0, 1, 1, 1, 0, -1, -1};

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    debug("debug test\n");
    int n,m;cin>>n;
    double ans = 0;
    rep(i, n){
        double b;string s;
        cin>>b>>s;
        if(s=="JPY"){
            ans += b;
        }else{
            ans += 380000.0*b;
        }
    }
    printf("%.10f\n", ans);
    return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

A,B,K=map(int,input().split())
gcd=math.gcd(A,B)
#print(gcd)
l=[]
for i in range(1,gcd+1):
    if gcd%i==0:
        l.append(i)
print(l)
print(l[len(l)-K])

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
n = int(input())
x = []
u = []
s = 0
for i in range(n):
    x.append(floart(input())
    u.append(input())
    if u == 'JPY':
      s = s + int(x)
    if u == 'BTC':
      s = s + ( x *  380000.0) 

print(s)

Submission status: Runtime Error

Solution code:
n = int(input())
x = []
u = []
s = 0
for i in range(n):
    x.append(floart(input())
    u.append(input())
    if u[i] == 'JPY':
      s = s + int(x)
    if u[i] == 'BTC':
      s = s + ( x *  380000.0) 

print(s)

Submission status: Runtime Error

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

print(s)

Submission status: Runtime Error

Solution code:
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors

N=input_int()



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

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

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

print(sums)

Submission status: Runtime Error

Solution code:
n = int(input())

for i in range(n):
    zi = list(map(float,input().split(" "))

oto = 0

for i in range(n):
    if zi[1] == "JPY":
        oto += zi[0]
    if zi[1] == "BTC":
        oto += 380000.0 * zi[0]

print(oto)

Submission status: Runtime Error

Solution code:
n = int(input())

for i in range(n):
    zi = list(map(float,input().split())

oto = 0

for i in range(n):
    if zi[1] == "JPY":
        oto += zi[0]
    if zi[1] == "BTC":
        oto += 380000.0 * zi[0]

print(oto)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

    print(ans)


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

    main(n, x_u)

Submission status: Runtime Error

Solution code:
n = int(input())

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

print(sum)

Submission status: Runtime Error

Solution code:
N = int(input())

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

print(ans)
mac:119 ryonakay$

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
x = [0] * N
u = [0] * N

ans = []

btc_1 = 380000.0


for i in range(N):
    x[i],u[i] = map(int, input().split())

        if u[i] == "JPY":
            ans.append(x[i])
    　　else:
        yen = ((x[i])*(btc_1))
        ans.append(yen)



print(sum(ans))

Submission status: Runtime Error

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


ans = []

btc_1 = 380000.0

for i  in range(N):
    if u[i] == "JPY":
        ans.append(x[i])
    else:
        yen = ((x[i])*(btc_1))
        ans.append(yen)

print(sum(ans))

Submission status: Runtime Error

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


ans = []

btc_1 = 380000.0

for i  in range(N):
    if u[i] == "JPY":
        ans.append(x[i])
    else:
        yen = ((x[i])*(btc_1))
        ans.append(yen)

print(sum(ans))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
n = int(input())

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

ans = 0

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

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

Submission status: Runtime Error

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


ans = []

btc_1 = 380000.0

for i  in range(N):
    if u[i] == "JPY":
        ans.append(x[i])
    else:
        yen = ((x[i])*(btc_1))
        ans.append(yen)

print(sum(ans))

Submission status: Runtime Error

Solution code:
N = int(input())

x = [0] * N
u = [0] * N

for i in range(N):
    x[i], u[i]  = map(int, input().split())


ans = []

btc_1 = 380000.0

for i  in range(N):
    if u[i] == "JPY":
        ans.append(x[i])
    else:
        yen = ((x[i])*(btc_1))
        ans.append(yen)

print(sum(ans))

Submission status: Runtime Error

Solution code:
N = int(input())

x = [0] * N
u = [0] * N

for i in range(N):
    x[i], u[i]  = map(int, input().split())


ans = []

btc_1 = 380000.0

for i  in range(N):
    if u[i] == "JPY":
        ans.append(x[i])
    else:
        yen = ((x[i])*(btc_1)
        ans.append(yen)

print(sum(ans))

Submission status: Runtime Error

Solution code:
a

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
3
100000000 JPY
100.00000000 BTC
0.00000001 BTC

Submission status: Runtime Error

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

print(ans)

Submission status: Runtime Error

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

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

print(money)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
money = []
for _ in range(n) :
    xi, yi = input().split()
    xi = int(xi)
    if yi == "JPY" :
        xi = xi
    elif yi == "BTC" :
        xi = xi * 380000.0
    money += [xi]
print(sum(money))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# ABC119B - Digital Gifts
def main():
    _, XU = open(0).read().split()
    ans, RATE = 0, 380000
    for x, u in zip(*[iter(XU)] * 2):
        x = float(x)
        ans += x if u == "JPY" else x * RATE
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
# ABC119B - Digital Gifts
def main():
    _, XU = open(0).read().split()
    ans, RATE = 0, 380000
    for x, u in zip(*[iter(XU)] * 2):
        x = float(x)
        total += x if u == "JPY" else x * RATE
    print(total)


if __name__ == "__main__":
    main()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

for i in range(n):
  x_temp, u_temp = map(int, input())
  if u_temp = 'BTC':
    x_temp *= 380000.0
  total += x_temp
  
print(total)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
dic = {"JPY": 1, "BTC": 380000}
ans = 0
for i in range(n):
  x,u = input().split()
  ans += int(x) * dic[u]
print(ans)

Submission status: Runtime Error

Solution code:
import sys 
stdin = sys.stdin
ns = lambda : stdin.readline().rstrip()
ni = lambda : int(ns())

n = ni()
btc = 380000
ans = 0
for _ range(n):
  a, b = ns().split()
  if b == "BTC":
    ans += float(a) * btc
  else:
    ans += int(a)
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
ans, a = 0, 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: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())

result=0
for item in range(n):
  a,b=map(str,input().split())
  if b=="JPY":
    result+=int(a)
  else:
    result+=int(a)*380000.0
print(result)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
rate=380000.0 #yen/btc

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

Submission status: Runtime Error

Solution code:
def exchange(btc):
  return 380000.0 / btc

n = int(input())
sum = 0.0
for i in range(n):
  a, b = input().split()
  if "JPY" in b:
    sum += float(a)
  else:
    sum += exchange(int(a))

print(sum)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
xu = [list(int,input().split()) for i in range(n)]
sigma = 0

for j in range(n):
  if xu[j][1] == "BTC":
    sigma = sigma + int(xu[j][0])*380000
  else:
    sigma = sigma + int(xu[j][0])
    
print(sigma)

Submission status: Runtime Error

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

for j in range(n):
  if xu[j][1] == "BTC":
    sigma = sigma + xu[j][0]*380000
  else:
    sigma = sigma + xu[j][0]
    
print(sigma)

Submission status: Runtime Error

Solution code:
n = int(input())
count = 0
for i in range(n):
  x, y = input().split()
  if y == 'JPY':
    x = int(x)
  else:
    x = int(x) * 3.8e5
  count += x
print(count)

Submission status: Runtime Error

Solution code:
n = int(input())
count = 0
for i in range(n):
  x, y = input().split()
  if y == 'JPY':
    x = int(x)
  else:
    x = int(x) * 3.8e5
  count += x
print(x)

Submission status: Runtime Error

Solution code:
n = int(input())
otoshidama = {"JPY":0, "BTC":0}
for i in range(n):
    a, b = map(str, input().split())
    a = float(a)
    if b == "JPY":
        otoshidama["JPY"] = otoshidama["JPY"] + a
    else:
        otoshidama["BTC"] = otoshidama["BTC"] + a
ans = otochidama["JPY"] + otochidama["BTC"] * 380000.0
print(ans)