luogu#P4317. 花神的数论题
花神的数论题
Background
As is well known, for many years Huashen has crushed various OJ, OI, CF, TC ... of course including CH.
Problem Description
One day, Huashen came to give another lecture. As usual, there was a super hard problem afterwards... We weaklings suffered again. The problem is as follows: Let denote the number of s in the binary representation of . Given a positive integer , Huashen asks you to compute , that is, the product of .
Input Format
A positive integer .
Output Format
One integer: the answer modulo .
3
2
Hint
Constraints: For of the testdata, .
Translated by ChatGPT 5