7 kyu

Deodorant Evaporator

719 of 27,471g964

Description:

This program tests the life of an evaporator containing a gas.

We know the content of the evaporator (content in ml), the percentage of foam or gas lost every day (evap_per_day) and the threshold (threshold) in percentage beyond which the evaporator is no longer useful. All numbers are strictly positive.

The program reports the nth day (as an integer) on which the evaporator will be out of use.

Example:

evaporator(10, 10, 5) -> 29

Note:

Content is in fact not necessary in the body of the function "evaporator", you can use it or not use it, as you wish. Some people might prefer to reason with content, some other with percentages only. It's up to you but you must keep it as a parameter because the tests have it as an argument.

Fundamentals

More By Author:

Check out these other kata created by g964

Stats:

CreatedMar 16, 2015
PublishedMar 16, 2015
Warriors Trained76745
Total Skips16738
Total Code Submissions89241
Total Times Completed27471
Ruby Completions719
Python Completions6258
Java Completions3566
C# Completions1683
Clojure Completions308
JavaScript Completions5616
Haskell Completions328
CoffeeScript Completions56
Elixir Completions288
TypeScript Completions594
C++ Completions2177
PHP Completions1098
Crystal Completions22
F# Completions130
C Completions1339
R Completions266
Shell Completions127
OCaml Completions87
Fortran Completions35
Julia Completions58
Scala Completions227
PowerShell Completions199
Kotlin Completions1225
Go Completions1042
Nim Completions32
Rust Completions560
Racket Completions59
Dart Completions659
Forth Completions25
Haxe Completions24
Pascal Completions51
Perl Completions49
Elm Completions19
D Completions12
Erlang Completions23
Prolog Completions15
Total Stars522
% of votes with a positive feedback rating78% of 3236
Total "Very Satisfied" Votes2105
Total "Somewhat Satisfied" Votes812
Total "Not Satisfied" Votes319
Ad
Contributors
  • g964 Avatar
  • jhoffner Avatar
  • AlexIsHappy Avatar
  • imjasonmiller Avatar
  • kazk Avatar
  • Voile Avatar
  • kdmatrosov Avatar
  • FArekkusu Avatar
  • monadius Avatar
  • fredc Avatar
  • Diviloper Avatar
  • hobovsky Avatar
  • trashy_incel Avatar
  • user8436785 Avatar
  • Just4FunCoder Avatar
  • KayleighWasTaken Avatar
  • saudiGuy Avatar
Ad