Practice - 1 "Sofia the first". Linear Algorithms




Task
Time limit: 1000 ms,
Memory limit: 256 Mb

Rabbit Clover is very fond of apples. He also likes to treat apples to his friends. Rabbit has N friends. He picked up apples in the garden K and wants to share them evenly between his friends. The non-dividing remainder remains in the basket. How many apples will each friend get and how many apples will he have in the basket? Help Rabbit Clover calculate this information.
Write a program for him.

The program receives two numbers at the input through a space: N - the number of friends of the rabbit (no more than 1000), K - the number of apples (no more than 1,000,000)
You need to print in the first line the number of apples that each friend will get
The second line is the number of apples that will remain in the basket

Example
Входные данные Выходные данные
1 10 25 2
5

Auto CHOOSE THE PROGRAMMING NECESSARY LANGUAGE!
Attach the program source file:
or enter the source code in the language:

Rules for designing programs and a list of errors during automatic task verification
           

Results: