Write a program that reads an integer number and a natural number , with , and prints the integer division and the remainder of divided by .
Remember that, by definition, i must be the only integer numbers such that and .
Input consists of and , with .
Print a line with the integer division and the remainder of divided by , separated by a space.
Depending on the programming language that you use, maybe you will need to modify a bit your program for the exercise problem://problemsjutge.org:problems/p1/jpetit/divmod.pbm to make it properly work with negative ’s.
Author: Unknown
Translator: Salvador Roura
Generation: 2026-01-25T11:58:08.324Z
© Jutge.org, 2006–2026.
https://jutge.org