Year to Century

When working with dates, you often need to quickly tell which century a year belongs to, whether for history, schedules, or clean reports. Write a function century that takes year and returns the century number. Remember the rule: years 1 through 100 are the 1st century, 101 through 200 are the 2nd, and 1900 still belongs to the 19th century.

Примеры

Ввод
1705
Вывод
18
Ввод
1900
Вывод
19
Ввод
1601
Вывод
17

Нужно реализовать

def century(year: int) -> int:

Теги

math
PostgreSQLv16

Her vises resultatet af din kode

Visible tests
1
Input
1705
Expected18
2
Input
1900
Expected19
3
Input
1601
Expected17
4
Input
2000
Expected20
5
Input
2742
Expected28
6
Input
-1705
Expected-17
Focus radio
Paused · SomaFM · Fluid