For AI agents: the complete documentation index is available at https://heyq02.com/llms.txt, the full documentation bundle is available at https://heyq02.com/llms-full.txt, and this page is available as Markdown at https://heyq02.com/blog/posts/csdn-weekly-contest-33-javascript-solutions.md.
跳到主要内容

CSDN 周赛第 33 期 JavaScript 题解

预计阅读时间: 小于 1 分钟

一、奇偶排序

给定一个存放整数的数组,重新排序数组使得数组左边为奇数,右边为偶数
输入描述:第一行输入整数n
(1<=n<=1000)表示数组大小
第二行输入n个整数a
实例:
输入:6    3 34 67 89 80 58
输出:3 67 89 34 90 58