Beihang OJ topic: ID2 (remainder)

Topic description

  • Find the remainder of two integers.

enter

  • Two positive integers n, m.

output

  • Output an integer that is the remainder when n is divided by m.

sample input

12 5

Sample output

2

AC code

#include <stdio.h>

int main()
{
    int n, m;

    scanf("%d%d", &n, &m);
    printf("%d\n", n%m);

    return 0;
}

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326612071&siteId=291194637