Page 1 of 1

10174 - Couple-Bachelor-Spinster Numbers.

Posted: Tue Jul 03, 2007 6:02 am
by rs17
Can anybody give me some test cases? I used long long to avoid integer overflow but I still have got 5 WAs.

Thanks in advance.

can any one give me some input of Spinster Number?????

Posted: Mon Jan 19, 2009 7:43 pm
by tajbir2000
i have not got 1!!!!!!!!!!!!! :roll:

Re: 10174 - Couple-Bachelor-Spinster Numbers

Posted: Mon Jan 19, 2009 7:51 pm
by mf
RTFPS!

Your program completely doesn't handle the second possible kind of queries:
If there are two numbers n1 and n2 in the input then print how many bachelor numbers are within n1 and n2 (including n1 and n2). Note that (n1?n2 and (n2- n1)<=1000000).
The first part of your code probably also doesn't work for negative numbers.

Re: 10174 - Couple-Bachelor-Spinster Numbers

Posted: Mon Jan 19, 2009 9:14 pm
by tajbir2000
THANKS mf I HAVE GOT aC

THERE WERE SOME PROBLEMS IN MY CODE.....I HAD NOT CONSIDERED -VE INT AND
c) Find out how many square couple numbers are there within a certain range (including the terminal numbers).
AGAIN THANKS.......