I solved it Thank you
* Content RecoveryTake two years after 1583, and print out the elapsed date from January 1 of the earlier year to January 1 of the later year. It is repeated until the two years are equal.
year: 2016
Enter year: 2017
January 1st, 2016 to January 1st, 2017: 366 days
Enter year: 2016
Enter year: 2010
January 1, 2010 to January 1, 2016: 2191
Enter year: 2500
Enter year: 2000
January 1, 2000 to January 1, 2500: 182622
Enter year: 2010
Enter year: 2019
January 1, 2010 to January 1, 2019: 3287 days
Enter year: 2019
Enter year: 2019
*The leap year should be considered and datetime should not be used (Crying)"T" I don't know the chords (Crying)
python
I don't even need a repeat. Considering the definition of leap year, This is a problem with a computational formula.
Now, you can implement this formula in Python! I just made a demo and it's calculated well according to the example given. Do it yourself!
Return the repeat sentence from the early year to the slow year as a for moon Think of it as i = year If it's divided by 4, add 366 and divide by 4, but if it's divided by 100, shouldn't we show the value of 365?
fori:= fast year to slow year do
begin
if (i mod 4) = 0 then
begin
if (i mod 100) = 0 then
sumday := sumday + 365
else sumday := sumday+ 366;
end;
end;
554 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
553 GDB gets version error when attempting to debug with the Presense SDK (IDE)
552 Uncaught (inpromise) Error on Electron: An object could not be cloned
556 PHP ssh2_scp_send fails to send files as intended
554 Who developed the "avformat-59.dll" that comes with FFmpeg?
© 2024 OneMinuteCode. All rights reserved.