PURPOSE: This randomized phase I/II trial is studying the side effects and best dose of clofarabine and to see how well it works when given together with cytarabine and idarubicin in treating patients with intermediate-risk or high-risk acute myeloid leukemia or high-risk myelodysplasia.