7 kyu
Target Date
729 of 3,313g964
Description:
You have an amount of money a0 > 0
and you deposit it with an interest rate of p percent divided by 360
per day on the 1st of January 2016
. You want to have an amount a >= a0
.
Task:
The function date_nb_days
(or dateNbDays...) with parameters a0, a, p
will return, as a string, the date on which you have just reached a
.
Example:
date_nb_days(100, 101, 0.98) --> "2017-01-01" (366 days)
date_nb_days(100, 150, 2.00) --> "2035-12-26" (7299 days)
Notes:
- The return format of the date is
"YYYY-MM-DD"
- The deposit is always on the
"2016-01-01"
- Don't forget to take the rate for a day to be
p divided by 36000
since banks consider that there are360
days in a year. - You have:
a0 > 0, p% > 0, a >= a0
Fundamentals
Mathematics
Similar Kata:
Stats:
Created | Jan 10, 2016 |
Published | Jan 10, 2016 |
Warriors Trained | 12119 |
Total Skips | 1133 |
Total Code Submissions | 13190 |
Total Times Completed | 3313 |
Java Completions | 428 |
C# Completions | 240 |
Ruby Completions | 86 |
Python Completions | 729 |
JavaScript Completions | 680 |
CoffeeScript Completions | 9 |
Haskell Completions | 41 |
Clojure Completions | 19 |
TypeScript Completions | 90 |
C++ Completions | 148 |
PHP Completions | 161 |
Crystal Completions | 7 |
F# Completions | 20 |
C Completions | 94 |
OCaml Completions | 15 |
Shell Completions | 77 |
R Completions | 73 |
Kotlin Completions | 196 |
Julia Completions | 12 |
Elixir Completions | 32 |
PowerShell Completions | 48 |
Go Completions | 157 |
Rust Completions | 91 |
Reason Completions | 3 |
Scala Completions | 25 |
Pascal Completions | 15 |
Raku Completions | 8 |
Perl Completions | 24 |
D Completions | 6 |
COBOL Completions | 4 |
Erlang Completions | 5 |
Total Stars | 178 |
% of votes with a positive feedback rating | 81% of 558 |
Total "Very Satisfied" Votes | 406 |
Total "Somewhat Satisfied" Votes | 88 |
Total "Not Satisfied" Votes | 64 |