7
2
Challenge
Given a the ID for a PPCG user who has existed for at least a month, output the average amount of reputation they gain per month. You can do this by dividing their reputation by the time since their account was created (which you can find on the profile). This should be returned floored; that is, truncate all of the decimals. (We don't care about the small stuff).
Input
A single integer, which is the user's ID
Output
A single integer, representing the floored rep change per month.
Test Cases
input -> output
42649 -> 127 (me)
12012 -> 3475 (Dennis)
8478 -> 3015 (Martin Ender)
4Can you define what a month is considered to be - a calendar month, a lunar month or 30 days? Or is it at our discretion? – Shaggy – 2017-05-05T07:27:12.143
@Shaggy When you go to a user profile, under the profile tab, it says "User for <x time>". Go by that. – HyperNeutrino – 2017-05-10T17:46:07.730
@HyperNeutrino so the formula is
(rep/daysSinceAccountCreate)*30
? You need to give us a constant for what a month is. – Sirens – 2017-05-11T17:39:22.100@Sirens Go here and Ctrl-F for
– HyperNeutrino – 2017-05-11T18:10:12.2771 year, 9 months
. That's what I mean.Should a check that the user has existed for at least a month be included? – DimP – 2017-05-18T13:02:16.980
@DimP I will say you can assume that. – HyperNeutrino – 2017-05-18T13:03:25.930