Skip to content

Commit

Permalink
ABC_083 B
Browse files Browse the repository at this point in the history
  • Loading branch information
IrukNuj committed Dec 13, 2018
1 parent 9a96f3d commit ab123f2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ABC_083/B.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
a, b, c = gets.split.map(&:to_i)
sum = 0

(0..a).each do |i|
add = 0
i.to_s.chars do |n|
add = add + n.to_i
end
sum = sum + i if (b..c).include?(add)
end

puts sum

0 comments on commit ab123f2

Please sign in to comment.