{"problem":{"name":"B. Sum","description":{"content":"Write a program to compute the following sum S given a positive integer n: , where  is the largest integer not greater than x. The input file consists of several datasets. The first line of the inpu","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10054B"},"statements":[{"statement_type":"Markdown","content":"Write a program to compute the following sum S given a positive integer n:\n\n, where  is the largest integer not greater than x.\n\nThe input file consists of several datasets. The first line of the input file contains the number of datasets which is a positive integer and is not greater than 30. The following lines describe the datasets.\n\nEach dataset contains a positive integer n (n ≤ 1012) written on a separate line.\n\nFor each dataset, write in one line the remainder of the computed sum S divided by 106.\n\n## Input\n\nThe input file consists of several datasets. The first line of the input file contains the number of datasets which is a positive integer and is not greater than 30. The following lines describe the datasets.Each dataset contains a positive integer n (n ≤ 1012) written on a separate line.\n\n## Output\n\nFor each dataset, write in one line the remainder of the computed sum S divided by 106.\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ t \\in \\mathbb{Z} $ be the number of datasets.  \nLet $ D = \\{n_k \\mid k \\in \\{1, \\dots, t\\}\\} $ be the set of inputs, where each $ n_k \\in \\mathbb{Z}^+ $ and $ n_k \\leq 10^{12} $.  \n\n**Objective**  \nFor each $ n_k $, compute:  \n$$\nS_k = \\sum_{i=1}^{n_k} \\left\\lfloor \\frac{n_k}{i} \\right\\rfloor\n$$  \nOutput $ S_k \\bmod 10^6 $.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10054B","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}