vj1128 选数

vj1128 选数 - / / / /...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
//±ÉÈ˵ķ½·¨ //ËÑË÷ //Ñ¡¶àÁË»ò²»¹»Ñ¡Í˳ö //Ñ¡ÍêÁËÅжÏÊÇ·ñΪÖÊÊý / const maxn=20; var n,k,ans:integer; sum:longint; a:array[0. .maxn] of longint; function check(x:longint):boolean; var i:integer; begin for i:=2 to trunc(sqrt(x)) do if x mod i=0 then exit(false); exit(true); end; procedure init; var i:integer; begin
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/21/2011 for the course CS 001 taught by Professor 001 during the Spring '11 term at Shandong University.

Ask a homework question - tutors are online