Skip to main content
6 of 9
added 34 characters in body; added 60 characters in body
Beta Decay
  • 23.4k
  • 8
  • 72
  • 165

Python 3 - 318

n=int(input());s=str;r=range
print([[a,b] for a in r(1,n) for b in r(1,a) for i in r(1,n) if i!=a and i!=b and s(i) in s(a) and s(i) in s(b) and s(a).count(s(i))<len(s(a)) and s(b).count(s(i))<len(s(b)) and not '0' in s(a) and not '0' in s(b) and eval(s(a).replace(s(i),'')+'/'+s(b).replace(s(i),''))==a/b and a+b<=n])

With n=80:

[[64, 16]]

With n=147

[[64, 16], [65, 26], [95, 19], [98, 49]]
Beta Decay
  • 23.4k
  • 8
  • 72
  • 165