Write a program that receives on stdin lines containing integers and writes out the first line in which both some number and its opposite appear; the line is to be reported together with the number itself.
The input is a sequence of zero or more lines. Each line cointains zero or more integers, separated by spaces.
Output is the first line of the input in which both some number and its opposite appear, preceded by the non-negative case of the number itself, with ": " (colon-single space) as separator. If several such numbers appear, the earliest-starting pair is to be reported. If there is no such line, the program must write "Not found."
Author: José Luis Balcázar
Generation: 2026-01-25T17:02:55.092Z
© Jutge.org, 2006–2026.
https://jutge.org