fork(2) download
  1. N = 10; % input
  2. t = .0001:.0001:2; % range of possible values: [.0001 .0002 ... 2]
  3. r = t;
  4. for k = 2:N
  5. r = t.^r; % repeated exponentiation, element-wise
  6. end
  7. [~, ind] = min(abs(r-N)); % index of entry of r that is closest to N
  8. result = t(ind);
  9. disp(result)
Success #stdin #stdout 0.23s 103552KB
stdin
Standard input is empty
stdout
 1.5085