#abc221d. D - Online games
D - Online games
Score : points
问题描述
存在一款拥有 名注册玩家的在线游戏。
今天是游戏上线以来的第 天,开发者高桥检查了用户的登录记录。结果显示,第 位玩家从第 天开始连续登录了 天,其中第 天为游戏上线首日,并且在其他日期没有登录。换句话说,第 位玩家在第 、、、 天登录,并且仅在这几天登录。
对于每个满足 的整数 ,请找出恰好有 名玩家登录的天数。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
There is an online game with registered players.
Today, which is the -th day since its launch, the developer Takahashi examined the users' login history. It turned out that the -th player logged in for consecutive days from Day , where Day is the launch day, and did not log in for the other days. In other words, the -th player logged in on Day , , , , and only on those days.
For each integer such that , find the number of days on which exactly players logged in.
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print integers with spaces in between, as follows:
Here, denotes the number of days on which exactly players logged in.
Sample Input 1
3
1 2
2 3
3 1
Sample Output 1
2 2 0
The first player logged in on Day , , the second player logged in on Day , , , and the third player logged in on Day only.
Thus, we can see that Day , had player logged in, Day , had players logged in, and the other days had no players logged in.
The answer is: there were days with exactly player logged in, days with exactly players logged in, and days with exactly players logged in.
Sample Input 2
2
1000000000 1000000000
1000000000 1000000000
Sample Output 2
0 1000000000
There may be two or more players who logged in during the same period.
update @ 2024/3/10 09:45:09