首页 > 代码库 > poj2739
poj2739
给定一个10000以内的数字,判断这个数字是否可以由几个连续的素数(例如:2,3,5,7...)相加得到,并且给出这个数可以有几组这样的解。
我是全POJ最骚的打表
#include<stdio.h> unsigned short a[10002]={0,0,1,1,0,2,0,1,1,0,1,1,1,1,0,1,0,2,1,1,0,0,0,2,1,0,1,0,1,1,1,2,0,0,0,0,2,1,0,1,0,3,1,1,0,0,0,1,1,1,0,0,1,2,0,0,1,0,1,2,2,1,0,0,0,0,0,2,1,0,0,2,2,1,0,1,0,1,1,1,0,0,0,3,1,0,0,0,1,1,2,0,0,0,0,1,0,2,1,0, 2,2,1,1,0,0,0,1,0,2,0,0,2,1,0,0,0,0,0,2,2,1,0,0,1,0,0,2,1,1,0,2,1,0,0,0,0,1,2,2,0,0,0,2,1,0,0,0,0,1,1,1,2,0,0,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,0,0,1,2,0,0,0,0,0,1,2,2,0,0,1,0,1,2,0,0,0,1,1,1,0,1,0,3,1,3, 0,0,1,0,2,0,0,0,0,0,2,2,0,0,0,0,1,0,0,0,1,2,1,3,0,0,0,1,2,1,0,0,0,2,0,1,1,0,1,1,3,1,0,1,0,0,0,0,0,0,0,3,1,1,0,0,0,1,2,0,0,0,0,2,1,0,0,0,1,2,1,2,1,0,0,0,2,1,0,1,1,3,0,1,0,0,0,3,1,0,1,0,0,1,0,0,0,0,0,0, 2,1,0,0,2,0,1,1,1,0,0,5,0,1,0,0,0,1,1,1,1,0,0,2,1,0,1,0,1,1,2,2,0,0,0,0,0,1,0,0,3,1,0,0,0,0,0,1,1,2,0,1,1,2,0,0,0,0,1,1,1,0,0,1,1,0,0,1,0,0,1,3,2,2,0,0,1,0,0,2,0,1,1,1,2,0,0,0,0,1,2,0,0,0,0,2,1,1,0,1, 0,3,0,0,0,0,0,1,2,1,2,0,1,0,0,0,0,0,0,1,1,2,0,1,1,1,0,0,0,0,1,2,1,1,2,1,0,0,1,3,1,0,1,2,0,0,0,0,0,2,1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,0,0,3,0,1,0,1,0,2,2,2,0,1,0,0,0,0,0,0,0,0,0,1,1,0,2,2,1,1,1,0,0,0,1,0,0,2,0,2,1,2,0,0,2,0,0,1,0,1,1,0,1,0,0,0,0,2,1,1,0,0,0,0,0,0,0,0,1,1,2,0,1,0,2,1,1,2,0,1, 2,1,0,0,0,1,0,1,0,0,0,0,0,1,0,2,1,0,1,1,0,1,0,0,0,1,3,0,0,0,0,0,1,2,0,0,1,1,1,1,0,0,0,1,1,0,0,1,3,1,1,1,0,0,1,1,0,1,0,0,1,1,0,0,0,1,2,1,2,2,0,0,0,2,1,0,0,1,0,1,0,1,0,0,1,2,0,2,0,0,0,1,1,0,0,0,1,1,0,0, 2,0,0,1,1,1,0,0,1,2,1,1,1,1,1,0,0,1,0,0,0,0,0,0,1,0,3,1,1,3,1,0,1,1,0,1,0,1,1,3,0,1,0,0,1,1,1,0,0,1,2,1,2,1,1,0,0,1,2,2,0,0,0,1,1,2,1,0,1,1,1,2,1,0,0,0,1,0,0,1,2,0,0,2,0,0,0,2,0,1,0,0,0,0,1,0,0,0,0,1, 0,2,0,0,0,1,0,3,1,0,1,0,2,0,1,2,0,0,0,0,2,1,1,1,2,0,0,0,0,2,0,1,0,0,0,1,1,1,0,1,0,1,1,0,0,0,0,0,3,2,0,0,0,1,0,2,0,1,1,1,1,0,0,0,1,0,0,1,2,0,2,2,0,1,1,0,1,0,1,1,1,0,0,2,1,0,1,0,1,0,0,0,1,0,1,0,0,0,0,1, 0}; int main() { int n; while(scanf("%d",&n),n) { printf("%d\n",a[n]); } }
poj2739
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。