Skip to content

Instantly share code, notes, and snippets.

@whatalnk
Created February 25, 2019 04:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whatalnk/21282ccd5732c74ca926e8489f021258 to your computer and use it in GitHub Desktop.
Save whatalnk/21282ccd5732c74ca926e8489f021258 to your computer and use it in GitHub Desktop.
AtCoder ABC #119 B. Digital Gifts
n = gets.chomp.to_i
ans = 0
n.times do
x, u = gets.chomp.split(" ")
if u == 'JPY'
ans += x.to_f
else
ans += x.to_f * 380000
end
end
puts ans
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment