+ 1

Please help me to make the program of this problem

Find the smallest positive common multiple of 4 and 6 such that each digit is either 4 or 6, there is at least one 4 and there is at least one 6.

20th Aug 2018, 4:59 PM
Zakirov Bobur
Zakirov Bobur - avatar
5 Answers
+ 1
The common Multiples of 4 an 6 are all Multiples of 12. So it is: i = 12 while True: if '4' in str(i) and '6' in str(i): print (i) break else: i += 12 >>> 264
26th Aug 2018, 8:22 PM
Sebastian at Zielgerade
Sebastian at Zielgerade - avatar
+ 1
Here you can easily change the Values https://code.sololearn.com/c46lgxev9mY7/?ref=app
26th Aug 2018, 8:33 PM
Sebastian at Zielgerade
Sebastian at Zielgerade - avatar
+ 1
It's wrong!!! The number must built eather 4 or 6, 2 is unuseful number...
27th Aug 2018, 2:16 AM
Zakirov Bobur
Zakirov Bobur - avatar
+ 1
So take my Code as a Hint and modify it for your Purpose.
27th Aug 2018, 4:56 AM
Sebastian at Zielgerade
Sebastian at Zielgerade - avatar
0
Ok
27th Aug 2018, 6:08 AM
Zakirov Bobur
Zakirov Bobur - avatar