@sumit, these numbers containing all ones are not in binary representation. They are in decimal system.
On Sat, Aug 6, 2011 at 9:51 AM, sahil gujral <[email protected]> wrote: > yes u r wrong.. > 111111111 is nt divisible by 23 > > > On Sat, Aug 6, 2011 at 9:15 AM, sumit <[email protected]> wrote: > >> This looks quite simple. >> Every number ending in 3 follows a pattern.eg- >> 3 - 111 >> 13 - 111111 >> 23 - 111111111 etc >> we can find the reauired no. by : >> suppose input no. is 33 >> In every case leave the no at 1's place(least significant) i.e. 3, In >> 33 you will be left with 3(after removal of 3 at first place). >> Now ,3 *(rest of nos +1 ) is your answer (in case of 33 it is 3*(3+1) >> = 12 i.e 111111111111). >> for 103 it is 3*(10+1) = 33 1's. >> >> Correct if I am wrong. >> >> >> On Aug 5, 4:33 pm, Manee <[email protected]> wrote: >> > ADOBE asks the very basic C/C++ questions >> > >> > one of their toughest however was : >> > >> > every number ending in 3 has a multiple of the form "111...111" >> > >> > e.g 3 has 111 >> > 13 has 111111 >> > so on.. >> > >> > find the algo for finding the number for an input number ending in 3. >> > >> > On Aug 5, 2:33 pm, Agyat <[email protected]> wrote: >> > >> > >> > >> > >> > >> > >> > >> > > hey, guys adobe is visiting our campus. So those who know questions >> > > that adobe asked in written or interview, please post here as it will >> > > be of great help (as adobe has visited some colleges already). >> > > Thank you in advance. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> >> > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- Nikhil Gupta Senior Co-ordinator, Publicity CSI, NSIT Students' Branch NSIT, New Delhi, India -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
