| Tishreen + SVU CPC 2023 |
|---|
| Finished |
After Da7doo7 got fired from his previous job, he became an online gamer. The internet was too slow, so he created this problem for fun:
You are monitoring the progress of a game download, and what interests you is the ratio of the completion percentage to the remaining percentage. It becomes particularly interesting when the ratio results in an integer value.
To put it simply, if the download progress reaches $$$75\%$$$, the ratio would be $$$75$$$ to $$$25$$$, which simplifies to $$$3$$$. Therefore, it is an interesting ratio.
Now, you have started another download, but it is not necessary to be out of $$$100$$$. In fact, it will be out of $$$n$$$. Your task is to calculate the sum of all interesting ratios that occur during the download process.
There will be $$$T$$$ downloads, you have to answer each one of them.
The first line contains a single integer $$$T$$$ $$$(1\le T\le 10^5)$$$ denoting the number of downloads.
Each of the following $$$T$$$ lines contains a single integer $$$n$$$ $$$(1\le n\le 10^6)$$$.
For each test case, print a single integer indicating the sum of all interesting ratios that occur during the $$$i$$$-th download process.
258
4 11
| Name |
|---|


