[ ASSIGNMENT: ] Maximum Multiple | Sololearn: Learn to code for FREE!


[ ASSIGNMENT: ] Maximum Multiple

TASK : Given a Divisor and a Bound. Find the largest integer N, such that - N is divisible by divisor - N is less than or equal to bound - N is greater than 0 NOTE : The parameters (divisor, bound) passed to the method are only positve values! Input, Output Examples :: 1. maxMultiple(2,7) --> return (6) (6) is divisible by (2), (6) is less than or equal to bound (7) and (6) is > 0 2. maxMultiple(10,50) --> return (50) (50) is divisible by (10), (50) is less than or equal to bound (50) and (50) is > 0

4/27/2018 11:12:54 AM

Danijel Ivanović

33 Answers

New Answer


Fabio Others can work and try whatever they want! I only have This πŸ‘‰γ€‹SoloLearn Platformγ€ŠπŸ‘ˆ and I am very grateful to them for everything they have enabled us, πŸ˜ŠπŸ€— so as long as they approve of what I do and the way I work, we are Unstoppable!! πŸ’ͺπŸ˜„πŸ‘πŸ˜πŸ»πŸ˜‰ HappyCodings!:-) πŸ˜„ on SoloLearn!!πŸ‘πŸ˜‰


Dennis We all know how to use internet, and we do it great! πŸ˜‰ Tasks of this type you can find where you want, and not just "codewars" !? If you want to do the task and set up your code to show your solution and allow others to find something New and LearnπŸ‘Œ it would be really nice. πŸ‘πŸ‘πŸ˜Š If you do not want, have you a nice day! 🌞


Seniru Pasan I'll add more of these tasks for sure, thank you for your support πŸ‘πŸ˜‰ but you need to do it them in a way that's required!




Fabio Thank you very much for the support, and I hope there will be more tasks like you say good ones! πŸ˜†πŸ‘πŸ‘Œ it's okay for you to disagree, I know well what you want to say, and the essence is to learn from others and try to bring something new and different, πŸ‘πŸ‘ but sometimes simply a person does not have a choice and then offers a solution instructed by previous experience. I say for myself and it is easiest for me to solve the task mathematically and then try to write the idea in the code in a creative way! I support your opinion and I always hope that we will have the opportunity to see new solutions! πŸ˜€πŸ‘ŒπŸ˜„πŸ˜ƒ Don't worry my friend!! 😊 && HappyCodings!! πŸ˜„πŸ‘πŸ˜‰


Fabio, my friend 😊 I know what you want to say and achieve, do not worry, no need to apologize πŸ‘ I have your great support and I really appreciate your opinion, every suggestion from you is always welcome πŸ‘ŒπŸ˜‰πŸ˜† we simply communicate and strive to improve what we do as much as we can for ourselves and others, and we agree very well. πŸ˜€πŸ˜„πŸ˜ƒ Be free to tell me everything you want, because in this way we learn and make progress! πŸ˜πŸ‘πŸ»


cyk Thank you very much for support!! 😊 and don't worry, I'm sure you will prepare a surprise! πŸ˜„πŸ˜ƒπŸ‘Œ HappyCodings!! πŸ˜€πŸ‘πŸ˜‰


Fabio I do not know which exact solutions you mean, I know that some of the solutions are repeated, but well, that's it! This is a simple mathematical task, set the equation and then transfer it into code, of course with the idea that you have πŸ˜€ I do not have another and better way because I'm leading mathematics. 😊 You did it really different and great!! πŸ‘πŸ‘ŒπŸ˜‰πŸ‘πŸ˜† You know that my tasks for this reason are quite simple, so we try to find a different solution. πŸ‘Œ I also have this answer! πŸ‘πŸ˜‰ https://code.sololearn.com/clEq4hnbyWzZ/?ref=app


Dennis Okay, and there you have solved the task, so you set it up here too, that's we need! πŸ‘πŸ˜‰ You have an appropriate advantage over others. πŸ˜„ I also saw the task there and did what you are, I just set up a task here because I spend my time here at SL! This is a common mathematical task and you can find them in various books. The essence of everything is to show our solution and present it, because in this way we learn! that is my opinion. // in general, tasks when you work, where you find them, in books, on the net, you write them, see in others, ... We have to find them somewhere!


Dennis You saw the task, have you seen a solution?! Where do you find the tasks you are doing? Are you writing them ?! SL has enabled us to practice and apply our skills that we have learned, bring new solutions, because each of us is thinking differently! πŸ‘ Demonstrate your skills and creativity, enable others to see it, thus making progress in what we do!! Thanks for taking part! πŸ‘πŸ˜‰




Python oneliner is here: https://code.sololearn.com/c96yMoq0BT7v/?ref=app




Here is my own code on this assignment in ruby..😎😎 https://code.sololearn.com/cOSgk1vm6Nl7/?ref=app


My try: https://code.sololearn.com/cNiP4QIlJU66/?ref=app


Java: https://code.sololearn.com/cR3es5zlmAe5 That was actually harder than I expected. X)


My try https://code.sololearn.com/cH18j2VVTdn3/?ref=app


Hey Danijel!! Good one as always! Will give this a try when I get a chance. Have had my head buried in my avengers code so didn't even check out what was going on on the discussion board 😏


Find the intruder.....πŸ˜‰πŸ˜œπŸ˜‚ https://code.sololearn.com/cGZW1zP9gbed/?ref=app https://code.sololearn.com/cod9FW02Xvh9/?ref=app https://code.sololearn.com/ch40ELHjK8rR/?ref=app https://code.sololearn.com/cVc4F8G2I87J/?ref=app


Many of the challenges here were taken from other platforms, the purpose of posting is to find a solution by ourselves. So here is my solution: https://code.sololearn.com/cNf3LBKY7sV4/?ref=app