#OLD841. 不要质数
不要质数
Description
输入一个长度为的数组,把其中所有的质数替换成-1,逆序输出替换后的数组,并输出被替换掉的数的个数
Format
Input
第一行为一个整数,为数组的长度
第二行为个数,每个数在1~1000之间。
Output
第一行输出 逆序输出替换后的数组,每两个数之间用空格隔开
第二行输出一个数字:被替换掉的数的个数
Samples
5
1 2 3 4 5
-1 4 -1 -1 1
3
5
1 1 1 1 1
1 1 1 1 1
0