Skip to content

Century From Year #34

@freedom5566

Description

@freedom5566

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年以此類推

你的任務是

給你一個西元年,回傳該年的世紀

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions