'The numeral jeden (1) behaves as an ordinary adjective, and no special rules apply. It can even be used in the plural, for example to mean "some" (and not others), or to mean "one" with pluralia tantum, e.g. jedne drzwi "one door" (drzwi has no singular). After the numerals dwa (dwie), trzy, cztery (2, 3, 4), and compound numbers ending with them (22, 23, 24, etc. but not ending in 11, 12, 13, 14 in any hundred), the noun is plural and takes the same case as the numeral, and the resulting noun phrase is plural (e.g. 104 koty stały, "104 cats stood").
With other numbers (5, 6, etc., 20, 21, 25, etc.), if the numeral is nominative or accusative, the noun takes the genitive plural form, and the resulting noun phrase is neuter singular (e.g. 5 kotów stało, "5 cats stood").
With the masculine personal plural forms of numbers (as given in the morphology article section), the rule given above – that if the numeral is nominative or accusative the noun is genitive plural, and the resulting phrase is neuter singular – applies to all numbers other than 1 (as in trzech mężczyzn przyszło, "three men came"), unless the alternative nominative forms dwaj, trzej, czterej (for 2, 3, 4) are used (these take nominative nouns and form a masculine plural phrase).
If the numeral is in the genitive, dative, instrumental or locative, the noun takes the same case as the numeral (except sometimes in the case of numbers that end with the nouns for 1000 and higher quantities, which often take a genitive noun regardless).'
When I was studying Greek, there was a sentence to translate, like "Auto eihai (to biblio)" (the brackets mean I'm not sure), which means "It is..." And I accidentally translated it as "it has", but Duo accepted my answer. I asked why on the discussion about that sentence, and someone told me that it was probably because since both "it is" and "it has" are contracted to "it's", Duo considered my answer as correct. So I thought that for this one sentence, it would accept "My friend is forty books" (even though I know that for a human being, it's incorrect), I wrote like this and it marked it as a mistake.