{"raw_statement":[{"iden":"statement","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"},{"iden":"input","content":"The 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."},{"iden":"output","content":"For each dataset, write in one line the remainder of the computed sum S divided by 106."},{"iden":"examples","content":"Input215Output110"}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**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 $.","simple_statement":"Given a positive integer n, compute the sum of floor(n/i) for i from 1 to n, then output the result modulo 10^6.","has_page_source":false}