Given a year, return the century it is in. 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.
년도를 넣으면 해당세기를 구하라
Example
- For
year = 1905, the output should becenturyFromYear(year) = 20; - For
year = 1700, the output should becenturyFromYear(year) = 17.
Code
int centuryFromYear(int year) {2
3
}'알고리즘(CF)' 카테고리의 다른 글
| 5. shapeArea (1) | 2017.06.07 |
|---|---|
| 4. adjacentElementsProduct (1) | 2017.06.07 |
| 3. checkPalindrome (1) | 2017.06.07 |
| 1. add (1) | 2017.06.07 |
| https://codefights.com (0) | 2017.06.07 |