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.
10174 - Couple-Bachelor-Spinster Numbers.
Moderator: Board moderators
10174 - Couple-Bachelor-Spinster Numbers.
How did I fall in love with PERL?
-
- New poster
- Posts: 19
- Joined: Fri Sep 05, 2008 6:39 pm
- Location: bangladesh
- Contact:
can any one give me some input of Spinster Number?????
i have not got 1!!!!!!!!!!!!!

Last edited by tajbir2000 on Mon Jan 19, 2009 8:21 pm, edited 1 time in total.
Re: 10174 - Couple-Bachelor-Spinster Numbers
RTFPS!
Your program completely doesn't handle the second possible kind of queries:
Your program completely doesn't handle the second possible kind of queries:
The first part of your code probably also doesn't work for negative numbers.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).
-
- New poster
- Posts: 19
- Joined: Fri Sep 05, 2008 6:39 pm
- Location: bangladesh
- Contact:
Re: 10174 - Couple-Bachelor-Spinster Numbers
THANKS mf I HAVE GOT aC
THERE WERE SOME PROBLEMS IN MY CODE.....I HAD NOT CONSIDERED -VE INT AND
THERE WERE SOME PROBLEMS IN MY CODE.....I HAD NOT CONSIDERED -VE INT AND
AGAIN THANKS.......c) Find out how many square couple numbers are there within a certain range (including the terminal numbers).