In mathematics, the absolute value (or modulus) a of a real number a is the numerical…
- User
In mathematics, the absolute value (or modulus) |a| of a real number a is the numerical value of a without regard to its sign. So, for example, the absolute value of 3 is 3, and the absolute value of -3 is also 3. The absolute value of a number may be thought of as its distance from zero. Input
There is a single positive integer T on the first line of input. It stands for the number of numbers to follow. Then there are T lines, each containing exactly one integer number N , -10000 ≤ N ≤ 10000
Output
For every input number N, output a single line containing the absolute value of N.
Example
Input: 4 -9 -4 6 -1 Output: 9 4 6 1
Assistant
pythont = int(input()) for _ in range(t): n = int(input()) print(abs(n))
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.