摘要: #include<stdio.h>#define N 21void isLegal(char *p){ if (*p >= '0'&&*p <= '9') { printf("illegal\n"); return; } else while (*++p) if (!(*p >= 'a'&&*p < 阅读全文
posted @ 2017-04-16 23:23 低调小怪 阅读(483) 评论(0) 推荐(0)
摘要: def isPrime1(n): for i in range(2,n):#对2到n取余 if n % i == 0: return False else:#注意缩进 return True def isPrime2(n): for i in range(2,n//2+1):#对2到n/2取余 if 阅读全文
posted @ 2017-04-16 19:05 低调小怪 阅读(5314) 评论(5) 推荐(0)