最大公约数、最小公倍数
大千SS
我爱大风和烈酒,也爱孤独和自由。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
HDOJ 1722--Cake(切蛋糕问题)
一次生日Party可能有p人或者q人参加,现准备有一个大蛋糕.问最少要将蛋糕切成多少块(每块大小不一定相等),才能使p人或者q人出席的任何一种情况,都能平均将蛋糕分食. Input 每行有两个数p和q. Output 输出最少要将蛋糕切成多少块. Sample Input 2 3...原创 2018-06-02 23:47:10 · 863 阅读 · 0 评论 -
hdu1222Wolf and Rabbit (公约数的巧题)
一个很坑的问题,想到点子上很好解决,想不到的话头破也不一定能做出来。 There is a hill with n holes around. The holes are signed from 0 to n-1. A rabbit must hide in one of the holes. A wolf searches the rabbit in anticlockwise o...原创 2018-06-04 23:15:41 · 335 阅读 · 0 评论
分享