Open freedom5566 opened 6 years ago
https://www.codewars.com/kata/century-from-year/
The first century spans from the year 1 up to and including the year 100, The second - from the year 101 up to and including the year 200, etc.
Task : Given a year, return the century it is in.
Input , Output Examples ::
centuryFromYear(1705) returns (18) centuryFromYear(1900) returns (19) centuryFromYear(1601) returns (17) centuryFromYear(2000) returns (20)
第一世紀是從1年到100年,包括100年,第二世紀-從101年到200年以此類推
你的任務是
給你一個西元年,回傳該年的世紀
https://www.codewars.com/kata/century-from-year/
題目
The first century spans from the year 1 up to and including the year 100, The second - from the year 101 up to and including the year 200, etc.
Task : Given a year, return the century it is in.
Input , Output Examples ::
第一世紀是從1年到100年,包括100年,第二世紀-從101年到200年以此類推
你的任務是
給你一個西元年,回傳該年的世紀