回复 19楼 demonleer
什么事?
重剑无锋,大巧不工
#include<stdio.h> int main() { int f[20001] = {0, 1}, n, i, j; for(i = 2; i <= 20001; i++) if(!f[i]) for(j = i; j <= 20001; j += i) f[j] = i; for(; scanf("%d", &n) != EOF; printf("%d\n", j)) for(j = i = 0; n-- && scanf("%d", &i); j = f[j] < f[i] ? i : j); return 0; }