#include #include #include #include #include #include #include #include #define TRUE (1 == 1) #define FALSE (1 != 1) #define DEBUG if (FALSE) #define UPPERLIMIT 32000 #define MAXPRIMES 3500 /* fprintf(stderr, "functionName: message", varslist); */ /* * Author: * Date: * Purpose: * Problem: */ /* * This template reads data a specified number of times. */ int numberOfTimes; int num; int primeCnt; int a[UPPERLIMIT]; int p[MAXPRIMES]; int ans[MAXPRIMES]; int ansCnt; int init() { /* FUNCTION init */ int i; int j; scanf("%d` ", &numberOfTimes); /* load p via Sieve of Erasthones */ primeCnt = 0; for (i=0; i< UPPERLIMIT; i++) a[i] = i; for (i=2; i