icpc:problems:luogup1150
problems | |
---|---|
名称 | Peter 的烟 |
题目编号 | P1150 |
题目链接 | luogu.com.cn/… |
来源 | Luogu |
算法分类 | 数学 |
难易程度 | 容易 |
Peter 的烟
想法
设总共抽完$x$根烟,可换的烟头为$x-1$个,换出来的烟共有$x-n$只,则建立方程:
$$x - n = \frac{x - 1}{k}$$
代码实现
/app/www/public/data/pages/icpc/problems/luogup1150.txt · 最后更改: 2024/04/20 14:45 由 温婕莺