>>720
(int)((double)rand()/RAND_MAX*N)+1