HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Arithmetic > problem:


50609 - Long division

Guest
• Discussion of problem (1)

Section problems

• 50553 - Divisible by m
• 50554 - nth power of m
• 50565 - Binary numbers
• 50574 - Triangular Numbers
• 50578 - Mersenne prime
• 50581 - The roots of a quadratic eq...
• 50595 - Sum of the numbers
• 50599 - Sum of Squared Error (SSE...
• 50609 - Long division
• 50548 - Albanian Airlines
• 50243 - Sum of digits
• 50241 - Greatest common divisor
• 50240 - The numbers that are divisi...
• 50242 - Numbers whose sum of the...
• 50248 - Power of two
• 50341 - Separate Into Digits
• 50335 - Five Math Operators

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.

Даны целое неотрицательное число M и целое положительное число N. Найти M div N и M mod N.

Ввод
В первой строке находится число M, во второй N.
Вывод
В первой строке вывести значение выражения M div N, во второй - выражения M mod N.
Ограничения
0 ≤ M ≤ 1060,000, 1 ≤ N ≤ 1,000,000.

Ввод 1
12345678901234567890
1000
Вывод 1
12345678901234567
890

Для отправки решений необходимо выполнить вход.

www.contester.ru