diff options
| author | Paul Jungeblut <paul.jungeblut@gmail.com> | 2016-06-27 11:17:34 +0200 |
|---|---|---|
| committer | Paul Jungeblut <paul.jungeblut@gmail.com> | 2016-06-27 11:17:34 +0200 |
| commit | 9e625b89bac7e8daaf583e215f3a0df3dc250bb2 (patch) | |
| tree | ab295455fce73f726bd97a325a61d95aca77a508 /sonstiges/josephusK.cpp | |
| parent | 5bb1ac05882e0df43a2afe0c363e0f503f51c357 (diff) | |
Math section rebuild, merged convinience and sonstiges section.
Diffstat (limited to 'sonstiges/josephusK.cpp')
| -rw-r--r-- | sonstiges/josephusK.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sonstiges/josephusK.cpp b/sonstiges/josephusK.cpp index e3fcac2..8758fee 100644 --- a/sonstiges/josephusK.cpp +++ b/sonstiges/josephusK.cpp @@ -1,4 +1,4 @@ -int josephus(int n, int k) { //returns the number of the last survivor (0 based) +int josephus(int n, int k) { // Gibt Index des letzten Überlebenden zurück, 0-basiert. if (n == 1) return 0; return (josephus(n - 1, k) + k) % n; }
\ No newline at end of file |
