VK and NCR
CodeChefOpen on judge ↗
VK was sitting bored in class (while Harshit was busy finding his 5T), and observes a particular expression written on his blackboard. As he loves math (and was given the task of problem setting), he made a new question for you! He gives you the following equation: , where x can be any integer. Given the value of N, he asks you to maximize the value of k. Output the answer modulo 109+7 Input
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start