20 - Day of the Programmer | Implementation | Hackerrank Solution | Python

Поділитися
Вставка
  • Опубліковано 16 гру 2024

КОМЕНТАРІ • 21

  • @rajarshikar1969
    @rajarshikar1969 4 роки тому +2

    Bruh thnx for helping me get the one thing I was missing to run my code. I just didn't understand the julian calender part in the question and you made it so easy. Love from India, to an Indian. 😊

    • @HackersRealm
      @HackersRealm  4 роки тому +1

      Thanks bruh... Glad I could help!!!!

  • @lightY22
    @lightY22 4 роки тому +2

    for me test case59 was failing, I tried (year

  • @micoazmi4793
    @micoazmi4793 3 місяці тому

    It looks better in light mode

  • @mainakbiswas6248
    @mainakbiswas6248 2 роки тому

    Sir can you explain me one thing I'm getting confused about. The year 1918 is not a leap year. So in that case will not the 256th date be 13th September cause in that year 29th February will not come so it should be 13th September right? Pls explain.

    • @AdeniyiAdebowale-yi9fc
      @AdeniyiAdebowale-yi9fc Місяць тому

      It was a mistake in the question should be February 1 and 14th
      Not January 31st
      Like the count from

  • @venkatdarapuneni7778
    @venkatdarapuneni7778 3 роки тому

    For me that code is not working bro , I am getting error at line no 13 elif condition statement

    • @LB-qr7nv
      @LB-qr7nv Рік тому

      Is it a syntax error? Maybe a "\" is missing at the end of the line. The backslash tells python that the expression continues at the next line

  • @nandinikanojiya0685
    @nandinikanojiya0685 4 роки тому +1

    Sir please explain the logic behind 26 September when the year is 1918

    • @Wreckers_B
      @Wreckers_B 7 місяців тому

      Not sure if it helps after 3years of the comment. But here's the explaination
      During the transition from the Julian to the Gregorian calendar, the adjustment involved skipping forward by a certain number of days to realign the calendar. So, after January 31st in the Julian calendar, the next day in the Gregorian calendar would not be February 1st, but rather February 14th, as it would skip forward by 13 days to account for the calendar adjustment. Then, the days in February would proceed as normal in the Gregorian calendar.

  • @nagrajkaranth123
    @nagrajkaranth123 4 роки тому

    Bro when you submit the code one test case gets failed

    • @HackersRealm
      @HackersRealm  4 роки тому

      Can you check the video at the end, all the test cases are passing only

    • @venkatdarapuneni7778
      @venkatdarapuneni7778 3 роки тому

      No we r not getting like u

  • @nagrajkaranth123
    @nagrajkaranth123 4 роки тому

    Bro sorry on doubting on you actually on 11 th line if year==1918 you wrote I putted '1918' so one test case failed

    • @HackersRealm
      @HackersRealm  4 роки тому

      It's ok, thank you for watching the video, i hope it's useful...

  • @civovic19
    @civovic19 4 роки тому

    I got wrong Answer for Test Case 59 , Input is 1918 , year is integer bro not str '1918'

    • @HackersRealm
      @HackersRealm  4 роки тому +1

      May be they would have changed the testcase later

  • @naturemusic2285
    @naturemusic2285 4 роки тому +1

    in question where it mention the 26.0date9.1918

    • @HackersRealm
      @HackersRealm  4 роки тому

      In the first paragraph last 5 lines, they gave a constraint for 1918, so we have to calculate the date seperately for that year. It is different from other years, because we have some days skip.

    • @saurabhk6004
      @saurabhk6004 2 роки тому

      @@HackersRealm explain how you calculate?

    • @edinmilenko1340
      @edinmilenko1340 Рік тому

      @@saurabhk6004 there are 13 days skiped so you must add 13 to the 256th day of that year, which is 13.09.1918 cuz 1918 is not a leap year