>>665
(long)rand() * RAND_MAX + rand()とかすれば?