An algorithm problem

question: there are two actions for a user to invest and refund (for example, if An invests 100000 yuan, then he will get a rebate of 10 yuan after maturity). When the user does not make any investment within 6 months, the next investment will be regarded as the first investment (reset in the investment time). Now there is a demand. Given any time, it is necessary to calculate the year of the user"s investment.

I really can"t figure it out.

Jul.11,2022
  • The problem of Object inheritance in scala

    : class Test{} object Driver extends Test{ } : abstract Fruit{ val name :String val color :String } object Fruit{ object Apple extends Fruit("apple","red") val menu=List(Apple) } question: (1) Why object in scala can al...

    Feb.28,2021
Menu