7 lines
119 B
Python
7 lines
119 B
Python
|
|
def problem_p02719(input_data):
|
||
|
|
N, K = list(map(int, input_data.split()))
|
||
|
|
|
||
|
|
r = N % K
|
||
|
|
|
||
|
|
return min(r, K - r)
|