标签:blog io for div log amp sp c acm
problem A
#include<stdio.h> int a[500]={0};//素数大表 int main() { int number; int anumber=0; int i=0; int flag=0; while(scanf("%d",&number)!=EOF) { if(anumber==0) { flag=0; for(i=2;i<=number/2;i++) { if(number%i==0) { flag=1; printf("N\n"); break; } } if(flag==0) { printf("Y\n"); } } } }
Problem B
标签:blog io for div log amp sp c acm
原文地址:http://www.cnblogs.com/zhko11993/p/3933019.html