#include <stdio.h>
void func(int n){
//ここから
static int count=0;
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+CnZvaWQgZnVuYyhpbnQgbil7Ci8v44GT44GT44GL44KJCglzdGF0aWMgaW50IGNvdW50PTA7Cgljb3VudCsrOwovL+OBk+OBk+OBvuOBp+OCkuWfi+OCgeOBpuOBj+OBoOOBleOBhAogICAgcHJpbnRmKCIlZOOBryVk55Wq55uu44Gu57Sg5pWwXG4iLCBuLCBjb3VudCk7Cn0KLy/lvJXmlbBu44GM57Sg5pWw44GL44Gp44GG44GL44Gu5Yik5a6a44KS44GX44G+44GZCi8v57Sg5pWw44Gq44KJ77yR44KS5oi744KK5YCk44Go44GX44Gm6L+U44GX77yM57Sg5pWw44Gn44Gq44GR44KM44GwMOOCkui/lOOBl+OBvuOBmQppbnQgcHJpbWUoaW50IG4pewogICAgaW50IGk7CiAgICBpbnQgc29zdXUgPSAxOwogICAgZm9yKGk9MjsgaTxuOyBpKyspewogICAgICAgIGlmKG4laSA9PSAwKXsgCiAgICAgICAgICAgc29zdXU9MDsKICAgICAgICAgICBicmVhazsKICAgICAgICB9CiAgICB9CiAgICByZXR1cm4gc29zdXU7Cn0KCmludCBtYWluKHZvaWQpIHsKICAgIGludCB4OwogICAgZm9yKGludCBpPTI7IGk8MjA7aSsrKXsKICAgICAgICB4ID0gcHJpbWUoaSk7CiAgICBpZiAoeCA9PSAxKXsKICAgICAgICBmdW5jKGkpOwogICAgfQp9CglyZXR1cm4gMDsKfQo=