clcclear alln = input('请输入n的值(100)');m = input('请输入m的值(500)');for s = n:m y = 0; for i = 1:(s - 1) if mod(s,i) == 0 y = y + i; end end if y == s s endend