Prime problem
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
#include <stdio.h> int sushu(int p) { int i; for(i=2;i<p;i++) if(p%i==0) return 0; return 1; } int main() { while(1) { int p1,p2,k,n; scanf("%d",&n); for(k=1;k<=n;k++) for(p1=3;p1<=n*n;p1++) for(p2=3;p2<=n*n;p2++) if((sushu(p1)+sushu(p2))==2 && k*k==(p1*p2+1) && p1<p2) printf("%d\n",k); } return 0; }