electicode
HomeCoursesResourcesProblemsNational OlympiadContestsLeaderboard
...

a mod b

Time Limit: 1000msMemory Limit: 256MB
View Submissions

Problem Description

Given two numbers aaa and bbb. Output the remainder of the division of aaa by bbb.

Input Format

The first line contains two integers aaa and bbb, separated by a space. (1≤a,b≤109)(1 \le a, b \le 10^9)(1≤a,b≤109).

Output Format

Output a single integer - the answer.

Examples

Example 1
Input
15 4
Output
3
Example 2
Input
16 4
Output
0
Example 3
Input
5 2
Output
1

© 2026 Electicode. All rights reserved.