All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
Maximum of divisor contraints (Posted on 2023-12-07) Difficulty: 2 of 5
Positive integers a,b are such that 137 divides a+139b and 139 divides a+137b. Find the minimum possible value of a+b.

No Solution Yet Submitted by Danish Ahmed Khan    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Solution | Comment 1 of 3
The minimum value for the sum a+b is 343
(275 + 139*68) / 137 = 71.0
(275 + 137*68) / 139 = 69.0

-----------------
found = False
for asum in range(2,1000):
    if found:
        break
    for a in range(1,asum):
        b = asum - a
        if (a + 139*b)%137 != 0:
            continue
        if (a + 137*b)%139 != 0:
            continue
        found = True
        if found:
            break
print('The minimum value for the sum a+b is {}'.format(a+b))
print('({} + 139*{}) / 137 = {}'.format(a,b, (a+139*b)/137))
print('({} + 137*{}) / 139 = {}'.format(a,b, (a+137*b)/139))

  Posted by Larry on 2023-12-07 16:36:52
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (13)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information