INTEGER DIVISION AND REMAINDER




In the module "Arithmetic Expressions" we talked about integer division operations.
Recall them again.
// - integer division, when the fractional part is dropped as a result of the division operation
% - calculation of the remainder of the division
The operation of calculating the remainder for negative numbers in Python is slightly different than in other programming languages, such as C ++ or Pascal
In Python, the operation of calculating the remainder is performed according to mathematical rules, that is, as is commonly believed in Number Theory, the remainder is a non-negative number.

Example

c = 10 // 3      # с = 3 
d = 10 % 3       # d = 1
e = -7 // 4      # e = -2
f = -7 % 4       # f = 1
The values of the variables e and f turned out so, because
-7 = (-2*4)+1
REMEMBER!
In Python, the operation of calculating the remainder for negative numbers is performed according to mathematical rules, i.e. -7% 4 = 1

Integer operations are very important in programming. They need to be understood and used correctly. And this requires practice!

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

Write a program that, given the two numbers a and b, displays the result of integer division and the remainder in the given format (see examples)
Two numbers are input to the program: a and b
Two lines must be printed:
the first line is the result of integer division of a by b
in the second line - the remainder of dividing a by b
See the output form in the example of input and output values.

Example 
Input
15 6
Output
15//6=2
15%6=3
 
 

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: