output given number of res