RosettaCodeData/Task/Trabb-Pardo-Knuth-algorithm/Picat/trabb-pardo-knuth-algorithm.picat

10 lines
192 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
import util.
go =>
L = [I.parse_term() : I in split(read_line())],
S = [[I,cond(F<=400,F,'TOO LARGE')] : I in L.len..-1..1, F=f(L[I])],
println(S),
nl.
f(T) = sqrt(abs(T)) + 5*T**3.