|
|||
Dog PageantWhile walking in a dog gym, someone counted the people and dogs present. By the time he got home, he forgot how many people and how many dogs he had counted, only remembering how many heads and how many legs they had. Write a program that reads pairs of integers from the standard input until end-of-file (EOF), one pair per line. The first input number is always the number of heads counted in the tournament, and the second is the number of legs. For each input line, the program should compute and write to the standard output in a separate line the number of people and the number of dogs participating in the pageant, separated by a space character, assuming that everyone who attended the event was healthy and unharmed. Sample Input
Output for Sample Input
Acknowledgement
This work was supported by the construction EFOP-3.4.3-16-2016-00021. The project was supported by the European Union, co-financed by the European Social Fund.
|
|||
University of Debrecen; Faculty of Informatics; v. 09/30/2024 |