📜  对于 year = 1905,输出应该是 CenturyFromYear(year) = 20; - 无论代码示例
📅  最后修改于: 2022-03-11 15:00:39.551000             🧑  作者: Mango
代码示例1
1
2
3
function centuryFromYear(year) {
return Math.floor(year/100) + ((year%100) ? 1 : 0)
}