From 3fe8ee352845741d97a76e2ed6a390cb1481d755 Mon Sep 17 00:00:00 2001 From: Gloria Mundi Date: Sat, 16 Nov 2024 21:43:46 +0100 Subject: minor changes --- content/other/josephus2.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'content/other/josephus2.cpp') diff --git a/content/other/josephus2.cpp b/content/other/josephus2.cpp index 33544ea..1c4295d 100644 --- a/content/other/josephus2.cpp +++ b/content/other/josephus2.cpp @@ -1,5 +1,5 @@ -int rotateLeft(int n) { // Der letzte Überlebende, 1-basiert. +ll rotateLeft(ll n) { // Der letzte Überlebende, 0-basiert. int bits = __lg(n); - n ^= 1 << bits; - return 2 * n + 1; + n ^= 1ll << bits; + return n << 1; } -- cgit v1.2.3