7 kyu

Sexagenary Cycle (干支): How old am I?

Description
Loading description...
Fundamentals
  • Please sign in or sign up to leave a comment.
  • cryingrock Avatar

    This comment has been hidden.

    • LanXnHn Avatar

      I spoiler it, this would made it a 8 kyu, and it is the key and simple thing to solve in this kata.

  • ejini战神 Avatar

    Approved! (Modifed description to language-agnostic and some cleaning on test cases)

  • benjaminzwhite Avatar

    Cool kata @LanXnHn

    Just out of interest (maybe relevant for the kata description also): why if the year of birth == present year does the calendar always say the person is 60 years old rather than 0 (full) years old?

    i.e. if one full year hasn't gone by yet, the situation would be descibed by for example ("甲子", "甲子") also or am I misunderstanding the calendar?

    (I understand the same situation applies to all multiples of 60, but presumably in practical use no-one ever reached 120 years old or 180 etc so the confusion would not arise often)

    謝謝(用過的翻譯器)!

    • LanXnHn Avatar

      Thank you for completing this kata.

      The point of 0 or 60 is just personal arbitrary.

      In general, I never heard anyone said "The child is 0 year old." but they would use "day", "week" or "month".

      This is just to make it simple, otherwise 1 and 61, 2 and 62, etc. It will be too complicated.