From 96ceb57bd40705538fd1da91065d2fb81a608857 Mon Sep 17 00:00:00 2001 From: Koichi Nakamura Date: Mon, 6 Dec 2021 22:43:43 +0900 Subject: [PATCH] replace "& ~(CELL - 1)" with "% CELL" --- others/planck.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/others/planck.py b/others/planck.py index edcd64a..af9a59b 100644 --- a/others/planck.py +++ b/others/planck.py @@ -33,7 +33,7 @@ ip = 0 np = 0 def aligned(n): - return (n + CELL - 1) & ~(CELL - 1) + return (n + CELL - 1) % CELL def align(): write(HERE_CELL, aligned(read(HERE_CELL)))