These are all different forms. To use with numbers (in simple cases, i.e. Nominative) you need three forms: Nominative singular, Nominative plural and Genitive plural:
- 1 рік (also 21, 31 . . .)
- 2, 3, 4 роки (also 22, 23, 24, 32,33,34 . . .)
- anything else (eg. 5, 6, 7, 12, 1000)—років
It depends on the last word of the expression for your number. For example
- 25 is двадцять п'ять and ends in the Ukranian word for "5"
- 32 is тридцять два and ends in the Ukranian word for "2" → тридцять два роки
- 101 is сто один and ends in the word for "1" → сто один рік
- 1914 is тисяча дев'ятсот чотирнадцять and ends in the Ukranian word the for "14"
- 1000 is just тисяча
- 2·10⁹ is два мільярди → два мільярди років
There are few Slavic languages that use a more complicated system. Russian uses basically the same one, but 2/3/4 have been classified in favour of Genitive singular rather than Nominative plural.
And that's why it would be useful to have some cursive on the course, I really struggled reading that example because the first words use cursive style letters.
Well, the thing is, I knew that, so I opted for this torture on purpose ^_^. After all, the words should be familiar to a learner.
Actually, it is a good way to train your Д's and Т's, because -дцать uses both.
There is also a cheater's way to do this: you can set your browser's default Sans-Serif font to something that does not have italics (like Tahoma, Verdana, Azbuka04 or Meiryo)—then you'll just see slanted Cyrillics instead. You see, Duolingo has Museo Sans as the main font, but that only affects Latin letters: for other scripts it just displays what your browser defaults say. In fact, you can have your browser display the Ukranian text in the course like that: