#include <stdio.h>
void func(int n){
//ここから
static int count;
count++;
//ここまでを埋めてください
printf("%dは%d番目の素数\n", n
, count
); }
//引数nが素数かどうかの判定をします
//素数なら1を戻り値として返し,素数でなければ0を返します
int prime(int n){
int i;
int sosuu = 1;
for(i=2; i<n; i++){
if(n%i == 0){
sosuu=0;
break;
}
}
return sosuu;
}
int main(void) {
int x;
for(int i=2; i<20;i++){
x = prime(i);
if (x == 1){
func(i);
}
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CnZvaWQgZnVuYyhpbnQgbil7Ci8v44GT44GT44GL44KJCnN0YXRpYyBpbnQgY291bnQ7CgogY291bnQrKzsKICAKLy/jgZPjgZPjgb7jgafjgpLln4vjgoHjgabjgY/jgaDjgZXjgYQKICAgIHByaW50ZigiJWTjga8lZOeVquebruOBrue0oOaVsFxuIiwgbiwgY291bnQpOwp9Ci8v5byV5pWwbuOBjOe0oOaVsOOBi+OBqeOBhuOBi+OBruWIpOWumuOCkuOBl+OBvuOBmQovL+e0oOaVsOOBquOCie+8keOCkuaIu+OCiuWApOOBqOOBl+OBpui/lOOBl++8jOe0oOaVsOOBp+OBquOBkeOCjOOBsDDjgpLov5TjgZfjgb7jgZkKaW50IHByaW1lKGludCBuKXsKICAgIGludCBpOwogICAgaW50IHNvc3V1ID0gMTsKICAgIGZvcihpPTI7IGk8bjsgaSsrKXsKICAgICAgICBpZihuJWkgPT0gMCl7IAogICAgICAgICAgIHNvc3V1PTA7CiAgICAgICAgICAgYnJlYWs7CiAgICAgICAgfQogICAgfQogICAgcmV0dXJuIHNvc3V1Owp9CgppbnQgbWFpbih2b2lkKSB7CiAgICBpbnQgeDsKICAgIGZvcihpbnQgaT0yOyBpPDIwO2krKyl7CiAgICAgICAgeCA9IHByaW1lKGkpOwogICAgaWYgKHggPT0gMSl7CiAgICAgICAgZnVuYyhpKTsKICAgIH0KfQoJcmV0dXJuIDA7Cn0K