欢迎来到起遇信息学
起遇信息学正处于上线筹建阶段,以下功能已全部开放免费体验: ✅ 完整题库浏览与代码提交评测(C / C++ / Python / Java 等) ✅ 入门到进阶的系列课程试读、作业与考试 ✅ AI 提示、AI 作业分析等智能助教功能 ✅ 赛事模拟与个人能力报告 ✅ 邮箱注册开放 ⏳ 付费课程订阅与微信/支付宝支付通道 ⏳ 手机号登录,微信扫码登录、微信公众号绑定 使用中如遇任何问题,欢迎通过页面底部 **"联系我们"** 与我们沟通。
CF1093A.Dice Rolling
Dice Rolling
Mishka got a six-faced dice. It has integer numbers from to written on its faces (all numbers on faces are different, so this is an almost usual dice).
Mishka wants to get exactly points by rolling his dice. The number of points is just a sum of numbers written at the topmost face of the dice for all the rolls Mishka makes.
Mishka doesn't really care about the number of rolls, so he just wants to know any number of rolls he can make to be able to get exactly points for them. Mishka is very lucky, so if the probability to get points with chosen number of rolls is non-zero, he will be able to roll the dice in such a way. Your task is to print this number. It is guaranteed that at least one answer exists.
Mishka is also very curious about different number of points to score so you have to answer independent queries.
Input
The first line of the input contains one integer () — the number of queries.
Each of the next lines contains one integer each. The -th line contains one integer () — the number of points Mishka wants to get.
Output
Print lines. In the -th line print the answer to the -th query (i.e. any number of rolls Mishka can make to be able to get exactly points for them). It is guaranteed that at least one answer exists.
Note
In the first query Mishka can roll a dice once and get points.
In the second query Mishka can roll a dice times and get points , and (for example).
In the third query Mishka can roll a dice times and get points times and points with the remaining roll.
In the fourth query Mishka can roll a dice times and get points times, points times and points times.
Samples
4
2
13
37
100
1
3
8
27
在线编程 IDE
建议全屏模式获得最佳体验
| 进入全屏编程 | Alt+E |
| 递交评测 | Ctrl+Enter |
| 注释/取消注释 | Ctrl+/ |
| 缩放字体 | Ctrl+滚轮 |