fork(1) download
  1. h={}
  2. 1.upto(1150){|n|s=0
  3. 1.upto(n){|x|s+=x if n%x<1}
  4. r=s/n.to_r
  5. p [h[r],n] if h[r]
  6. h[r]=n}
Success #stdin #stdout 0.13s 7480KB
stdin
Standard input is empty
stdout
[6, 28]
[30, 140]
[80, 200]
[40, 224]
[12, 234]
[84, 270]
[66, 308]
[78, 364]
[102, 476]
[28, 496]
[114, 532]
[240, 600]
[138, 644]
[120, 672]
[150, 700]
[174, 812]
[135, 819]
[186, 868]
[864, 936]
[222, 1036]
[246, 1148]