#1498. 「hyOI2019」henry_y's function
「hyOI2019」henry_y's function
Description
Thanks
One day you found a magical function which satisfies many properties:
- 。
- ( is prime, denotes bitwise exclusive or)。
- ( and are coprime numbers)。
You were happy to find this function so you wanted to find .
However, eventually you couldn't come up with any ideas. Therefore, you asked
henry_y: Isn't this problem from LibreOJ?
henry_y thought this problem was too simple so he asked you another problem.
Let
$$f(n) = \left( \sum_{i = 1}^n \left\lfloor \frac ni \right\rfloor^2 g(i) \right) \bmod 998244353 $$Find 。
Input
The first line contains a positive integer .
Output
The first line contains a non-negative integer, representing the answer.
Sample 1
5
61
10
207
10000
287416092
Limits And Hints
Update 2019/7/10 20:23:We have set the time limit to 1500ms. The using time of standard program on each test did not exceed 500ms, though, so please notice the constant factor's effect.
For of data,。
For of data,。
For of data,。
For of data,。
Problem information
- Idea: https://loj.ac/user/3003
- Solution: @_rqy
- Std / Data: https://loj.ac/user/1408
- Testing: https://loj.ac/user/10399