Given 100 lists containing n integers and f anonymous functions, apply each function to the integers before it, in the order of the list.
Input
- -10 000 ≤ n ≤ 10 000
- f is of the form
λn.M
where M is the function applied ton
. There are two kinds of functions:- A test, in which case you have to keep the elements that verify the condition set :
- Greather than
>
and strictly greater than≥
- Less than
<
and strictly less than≤
- Equality modulo d :
n mod d == r
- Greather than
- A modification :
- Multiplication
- Addition
- Substraction
- Negation
- A test, in which case you have to keep the elements that verify the condition set :
Output
100 lines, each containing the corresponding list after applying all functions.
Examples
Input :
[2, λn.(n*2), 2, λn.(n*2)]
Output :
[8, 4]
Input :
[9146,9309,-1332,4467,λn.(n<9314),-9297,3437,-2358,λn.(n<-935),6483,-8416,-6976,4069,-2440,λn.(n*-845),9171,1761,8865,3942,λn.(n+132),3145,7997,-7926,-5691,λn.(n≤1547),5807,-2768,5346,-4696,-9519,λn.(-n),5371,6115,2561,λn.(n≥-366),3549,8956,-6472,λn.(n<-846),8729,-8316,-2438,9643,λn.(n≥746),9606,5899,λn.(n≤2279)]
Output :
[]
Input :
[-2334,-2967,-7057,9315,4773,λn.(n*305),8854,λn.(n>691),3625,8897,6406,λn.(n>-973),-7395,-9652,8740,-6830,λn.(n mod 2 == 0),1888,λn.(n>808),6667,λn.(-n),3345,-1220,3937,λn.(n<2364),3964,-3360,8273,λn.(n<2580),-1356,6530,λn.(-n),15,7664,-4465,-6157,λn.(-n)]
Output :
[-8854,-6406,-8740,-1888,-6667,-1220,-3360,-1356,6530,-15,-7664,4465,6157]