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
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b366af-2c01e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b366af-2c01e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?