如果绝望是一种以天赋,那么我就是 • 3个月前
include <stdio.h> int main() {
int n, s = 1, i; scanf("%d", &n); for (int i = 2; i <= n - 1; i++) {
if (n % i == 0) s = 0;
} if (s == 1)
printf("1");
else
printf("-1");
return 0; }
评论:
请先登录,才能进行评论