#include <stdio.h>
#include <time.h>
#include <math.h>
int main(void) {
int count;
int i;
int j;
int k;
int c;
int prime;
clock_t start;
clock_t end;
double elapsed;
int primes[100];
/* init primes */
primes[0] = 2;
c = 1;
/* input */
/* measure time */
for (i = 3; c < count; i += 2) {
/* isPrime */
prime = 1;
for (j = 3; j <= k; j += 2) {
if (i % j == 0) {
prime = 0;
break;
}
}
if (prime) {
primes[c] = i;
c = c + 1;
}
}
elapsed = end - start;
/* output */
for (i = 0; i < count; i++) {
}
printf("elapsed time:%f\n", elapsed
);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDx0aW1lLmg+CiNpbmNsdWRlIDxtYXRoLmg+CgppbnQgbWFpbih2b2lkKSB7CiAgICBpbnQgY291bnQ7CglpbnQgaTsKCWludCBqOwoJaW50IGs7CglpbnQgYzsKCWludCBwcmltZTsKCWNsb2NrX3Qgc3RhcnQ7CgljbG9ja190IGVuZDsKCWRvdWJsZSBlbGFwc2VkOwoJaW50IHByaW1lc1sxMDBdOwoJCgkvKiBpbml0IHByaW1lcyAqLwoJcHJpbWVzWzBdID0gMjsKCWMgPSAxOwoJCgkvKiBpbnB1dCAqLwoJc2NhbmYoIiVkIiwgJmNvdW50KTsKCQoJLyogbWVhc3VyZSB0aW1lICovCglzdGFydCA9IGNsb2NrKCk7Cglmb3IgKGkgPSAzOyBjIDwgY291bnQ7IGkgKz0gMikgewoJCS8qIGlzUHJpbWUgKi8KCQlrID0gc3FydChpKTsKCQlwcmltZSA9IDE7CgkJZm9yIChqID0gMzsgaiA8PSBrOyBqICs9IDIpIHsKCQkJaWYgKGkgJSBqID09IDApIHsKCQkJCXByaW1lID0gMDsKCQkJCWJyZWFrOwoJCQl9CgkJfQoJCWlmIChwcmltZSkgewoJCQlwcmltZXNbY10gPSBpOwoJCQljID0gYyArIDE7CgkJfQoJfQoJZW5kID0gY2xvY2soKTsKCWVsYXBzZWQgPSBlbmQgLSBzdGFydDsKCQoJLyogb3V0cHV0ICovCglmb3IgKGkgPSAwOyBpIDwgY291bnQ7IGkrKykgewoJCXByaW50ZigiJWQgIiwgcHJpbWVzW2ldKTsKCX0KCXByaW50ZigiXG4iKTsKCXByaW50ZigiZWxhcHNlZCB0aW1lOiVmXG4iLCBlbGFwc2VkKTsgCgkKCXJldHVybiAwOwp9