Problem:

Remainder of Big Integers

  Given two integers $A$ and $B$, compute the remainder of $\frac{A}{B}$.

Input

  Two integers $A$ and $B$ separated by a space character are given in a line.

Output

  Print the remainder in a line.

Constraints

  
$0 \leq A, B \leq 10^{1000}$

  
$B \ne 0$

Sample Input 1

5 8

Sample Output 1

5

Sample Input 2

100 25

Sample Output 2

0



Sample input:
5 8


Sample output:
5

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
print(a//b)

Submission status: Accepted

Solution code:
def main():
   a,b = map(int, input().split())
   print(a%b)


main()

Submission status: Accepted

Solution code:
import sys
a,b=map(int,sys.stdin.readline().split())
print(a%b)

Submission status: Accepted

Solution code:
a,b=map(int, input().split())
print(a%b)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print(a % b)

Submission status: Accepted

Solution code:
a, b = map(int,input().split())
print(a%b)

Submission status: Accepted

Solution code:
a, b = [int(i) for i in input().split()]
print(a % b)

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
print(a%b)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print(a % b)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
print(a%b)

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
print(a % b)

Submission status: Accepted

Solution code:
a, b=input().split(' ')
a=int(a)
b=int(b)

print(a-a//b*b)

Submission status: Accepted

Solution code:
a, b = map(int,input().split())
print(a%b)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print(a%b)

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
print(a%b)

Submission status: Accepted

Solution code:
print(eval(input().replace(" ","%")))

Submission status: Accepted

Solution code:
#標準入力
a,b = map(int,input().split())

#aをbで割った余りを出力する
print(a % b)

Submission status: Accepted

Solution code:
a,b=map(int, input().split())
print(a%b)

Submission status: Accepted

Solution code:
import sys,bisect,math
from functools import reduce
sys.setrecursionlimit(15000)

import sys,bisect,math
A,B = map(int,sys.stdin.readline().split())
res = A%B
print(res)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
ans=a%b
print(ans)

Submission status: Accepted

Solution code:
import math
n, m = map(int, input().split())
print(n % m)

Submission status: Accepted

Solution code:
x = input()
a, b = x.split()
a = int(a)
b = int(b)
print(a % b)

Submission status: Accepted

Solution code:
s = input().split()
a = int(s[0])
b = int(s[1])
print(a % b)

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
print(A % B)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
print(a%b)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())

print(a%b)

Submission status: Accepted

Solution code:
A,B=[int(i) for i in input().split(" ")]
print(A%B)

Submission status: Accepted

Solution code:
a,b = map(int,input().split())

print(a%b)

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
print(A % B)

Submission status: Accepted

Solution code:
a = [int (i) for i in input().split()];
print (a[0] % a[1]);

Submission status: Accepted

Solution code:
a,b = map(int,input().split())

print(a%b)

Submission status: Accepted

Solution code:
(x,y)=map(int,input().split(' '))
print(x%y);

Submission status: Accepted

Solution code:
a = map(long,raw_input().split(' '))
print a[0] % a[1]

Submission status: Accepted

Solution code:
a, b = map(int,input().split())
print(a % b)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a,b = map(int,input().split())

print(a % b)

Submission status: Accepted

Solution code:
def main():
    A, B = map(int, input().split())
    print(A%B)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a,b = [int(x) for x in input().split()]

print(a%b)

Submission status: Accepted

Solution code:
#import pysnooper
#import os,re,sys,operator,math,heapq,string
from collections import Counter,deque
#from operator import itemgetter
#from itertools import accumulate,combinations,groupby,combinations_with_replacement,permutations
from sys import stdin,setrecursionlimit
#from copy import deepcopy

setrecursionlimit(10**6)
input=stdin.readline

a,b=map(int,input().split())
print(a%b)

Submission status: Accepted

Solution code:
import sys

a,b=list(map(int,input().split()))
print(a%b)

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    a, b = list(map(lambda x: int(x), input().split()))
    print(a % b)

Submission status: Accepted

Solution code:
a,b=map(int,input().split() )
print(a%b)

Submission status: Accepted

Solution code:
a, b = input().split()
print(int(a) % int(b))

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007
#1_A
"""
import math

n = int(input())
m = n
ans = []
i = 2
k = math.sqrt(n)
while i <= k:
    if n%i == 0:
        n = n//i
        ans.append(i)
        i -= 1
        if n == 1:
            break
    i += 1
if len(ans) == 0 or n != 1:
    ans.append(n)
print(m,end = ": ")
for i in range(len(ans)-1):
    print(ans[i], end = " ")
print(ans[-1])
"""

#1_B
"""
m,n = map(int, input().split())
b = bin(n)[2:]
num = [m]
for i in range(len(b)-1):
    num.append(num[-1]**2%1000000007)
ans = 1
for i in range(len(b)):
    ans *= num[i] if b[len(b)-1-i] == "1" else 1
    ans %= 1000000007
print(ans)
"""

#1_C
"""
import math

l = int(input())
a = list(map(int, input().split()))
dict = {}
for n in a:
    ans = []
    i = 2
    k = math.sqrt(n)
    dic = {}
    while i <= k:
        if n%i == 0:
            n = n//i
            ans.append(i)
            i -= 1
            if n == 1:
                break
        i += 1
    if len(ans) == 0 or n != 1:
        ans.append(n)
    for i in ans:
        if i in dic:
            dic[i] += 1
        else:
            dic[i] = 1
    for i in dic.keys():
        if i in dict:
            dict[i] = max(dict[i], dic[i])
        else:
            dict[i] = dic[i]
sum = 1
for x,y in dict.items():
    sum *= x**y
print(sum)
"""

#1_D
"""
import math

n = int(input())
m = n
ans = []
i = 2
k = math.sqrt(n)
dic = {}
while i <= k:
    if n%i == 0:
        n = n//i
        ans.append(i)
        i -= 1
        if n == 1:
            break
    i += 1
if len(ans) == 0 or n != 1:
    ans.append(n)
ans = list(set(ans))
sum = m
for i in ans:
    sum *= (1-1/i)
print(int(sum))
"""

#1_E
"""
def gcd(a,b):
    if a==0:
        return b
    return gcd(b%a,a)
a,b = LI()
g = gcd(a,b)
a//=g
b//=g
if b == 1:
    print(0,1)
    quit()
if b < 4:
    f = b-1
else:
    p = []
    x = 2
    m = b
    while x**2 <= b:
        if not m%x:
            p.append(x)
            while not m%x:
                m//=x
        x += 1
    if m != 1:p.append(m)
    f = b
    for i in p:
        f *= (1-1/i)
    f = int(f)
x_ = pow(a,f-1,b)
y_ = (1-a*x_)//b
ans = [x_,y_,abs(x_)+abs(y_)]
for i in range(-10000,10000):
    s = -b*i+x_
    t = a*i+y_
    m = abs(s)+abs(t)
    if m < ans[2]:
        ans = [s,t,m]
    elif m == ans[2] and s <= t:
        ans = [s,t,m]
print(ans[0],ans[1])
"""

#2
#2_A
"""
a,b = LI()
print(a+b)
"""

#2_B
"""
a,b = LI()
print(a-b)
"""

#2_C
"""
a,b = LI()
print(a*b)
"""

#2_D
"""
a,b = LI()
if a*b < 0:
    print(-(-a//b))
else:
    print(a//b)
"""
#2_E

a,b = LI()
print(a%b)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Big Integers - Remainder of Big Integers
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=NTL_2_E&lang=jp

"""
import sys


def main(args):
    A, B = map(int, input().split())
    print(A % B)


if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Accepted

Solution code:
a = input().split()
print(int(a[0]) % int(a[1]))

Submission status: Accepted

Solution code:
A, B = map(int, input().split())


print(A % B)

Submission status: Accepted

Solution code:
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
Max = sys.maxsize
def l(): #intのlist
	return list(map(int,input().split()))
def m(): #複数文字
	return map(int,input().split())
def onem(): #Nとかの取得
	return int(input())
def s(x): #圧縮
	a = []
	aa = x[0]
	su = 1
	for i in range(len(x)-1):
		if aa == x[i+1]:
			a.append([aa,su])
			aa = x[i+1]
			su = 1
		else:
			su += 1
	a.append([aa,su])
	return a
def jo(x): #listをスペースごとに分ける
	return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
	return max(map(max,x))

n,m= m()

print(n%m)

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
print(A%B)

Submission status: Accepted

Solution code:
A, B = map(int, input().split())

print(A % B)

Submission status: Accepted

Solution code:
A, B = map(int, raw_input().split())
print A % B

Submission status: Accepted

Solution code:
print(eval(input().replace(' ','%')))

Submission status: Accepted

Solution code:
x,y = list(map(int, input().split()))
print(x%y)

Submission status: Accepted

Solution code:
from decimal import *

a, b = input().rstrip().split(' ')

getcontext().prec = len(a)

ans = Decimal(a) % Decimal(b)
ans = ans.quantize(Decimal('1.'), rounding=ROUND_DOWN)
if ans == 0:
    print(0)
else:
    print(ans)

Submission status: Accepted

Solution code:
a,b=input().split(" ")
a=int(a)
b=int(b)
print(a%b)