#P16299. [蓝桥杯 2026 省 Python C 组] 底层协议

    ID: 18314 远端评测题 1000ms 512MiB 尝试: 0 已通过: 0 显示难度普及− 上传者: 标签>数学数论2026蓝桥杯省赛

[蓝桥杯 2026 省 Python C 组] 底层协议

Problem Description

In the digital twin system of the industrial metaverse, every physical vibration on the real production line is captured as a stream of data, and is labeled in chronological order with indices 1,2,3,…,N1, 2, 3, \dots, N, serving as the index for synchronizing the virtual and the real.

To resist system jitter caused by high-frequency data throughput, the system temporarily stores these data in a synchronization buffer pool to wait for processing. However, the underlying protocol defines a strict defensive rule: for any two different indices in the buffer pool, their sum must never be divisible by 20262026. Once violated, the data stream will cause a logic conflict due to spectrum overlap, and all data in the buffer pool will be judged as abnormal by the system and discarded.

Now, please compute, within the range of indices from 11 to NN, what is the maximum number of indices that the buffer pool can theoretically hold while satisfying the protocol constraint?

Input Format

One line containing a positive integer NN.

Output Format

One line containing an integer, representing the maximum capacity of the buffer pool that satisfies the condition.

10
10
2025
1013

Hint

Constraints

For 30%30\% of the testdata, 1≤N≤20261 \le N \le 2026.

For 50%50\% of the testdata, 1≤N≤1051 \le N \le 10^5.

For all testdata, 1≤N≤10181 \le N \le 10^{18}.

Translated by ChatGPT 5