Easy C++ Beginner Solution || O(1) || Beats 100%
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int numberOfChild(int m, int k) {\n        int x = 0, n = 0;\n        if((k % (m - 1)) % 2 == 0) n = 0;\n        else n = m - 1;\n        k = k % (m - 1);\n        if(n == 0) n = k;\n        else n = m - 1 - k;\n        return n;\n    }\n};\n```
['C++']