10174 - Couple-Bachelor-Spinster Numbers.

All about problems in Volume 101. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Post Reply
rs17
New poster
Posts: 5
Joined: Tue Jul 03, 2007 5:49 am
Location: UNKNOWN
Contact:

10174 - Couple-Bachelor-Spinster Numbers.

Post 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.
How did I fall in love with PERL?

tajbir2000
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?????

Post by tajbir2000 »

i have not got 1!!!!!!!!!!!!! :roll:
Last edited by tajbir2000 on Mon Jan 19, 2009 8:21 pm, edited 1 time in total.

mf
Guru
Posts: 1244
Joined: Mon Feb 28, 2005 4:51 am
Location: Zürich, Switzerland
Contact:

Re: 10174 - Couple-Bachelor-Spinster Numbers

Post 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.

tajbir2000
New poster
Posts: 19
Joined: Fri Sep 05, 2008 6:39 pm
Location: bangladesh
Contact:

Re: 10174 - Couple-Bachelor-Spinster Numbers

Post 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.......

Post Reply

Return to “Volume 101 (10100-10199)”