Skip to content

Instantly share code, notes, and snippets.

@rakuishi
Created July 3, 2017 12:11
Show Gist options
  • Save rakuishi/5ecfb683ce0831265e278d95fd765336 to your computer and use it in GitHub Desktop.
Save rakuishi/5ecfb683ce0831265e278d95fd765336 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
# $ ruby start-delegated-harvesting.rb 15064
amount = ARGV[0].to_i
vestedBalance = 0
days = 0
if amount <= 10000
puts 'Inputted amount is less than 10,000'
else
while vestedBalance < 10000
vestedBalance += (amount * 0.1)
amount *= 0.9
days += 1
end
puts "#{days} days required"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment