From 5ab8a5088b729a9953b8dff1b2a985dc8fb2098b Mon Sep 17 00:00:00 2001 From: mzuenni Date: Mon, 27 Jun 2022 17:19:28 +0200 Subject: updated tcr --- other/josephusK.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'other/josephusK.cpp') diff --git a/other/josephusK.cpp b/other/josephusK.cpp index 522b584..8d4df4d 100644 --- a/other/josephusK.cpp +++ b/other/josephusK.cpp @@ -1,4 +1,5 @@ -int josephus(int n, int k) { // Der letzte Überlebende, 0-basiert. +// Der letzte Überlebende, 0-basiert. +int josephus(int n, int k) { if (n == 1) return 0; return (josephus(n - 1, k) + k) % n; } \ No newline at end of file -- cgit v1.2.3