#P4905. 报纸
报纸
Description
As a return for making the PPT, classmate XHY decides to send some “warmth” to CYD dashen—a set of answers to an English newspaper. This newspaper is an grid, where some cells contain answers. The distribution seems regular: for cell , it contains an answer if and only if and are not coprime.
XHY’s phone can capture one region per photo (either horizontal or vertical). Please write a program to find the minimum number of photos required to capture all the answers and send them to CYD dashen.
Input Format
One line, a positive integer .
Output Format
One line, a non-negative integer representing the minimum number of photos required.
4
5
5
6
6
11
Hint
Constraints:
- For 30% of the testdata, .
- For 60% of the testdata, .
- For 100% of the testdata, .
Translated by ChatGPT 5
京公网安备 11011102002149号