timus; solve "Factorials!!!" from Volume 1