Cake |
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) |
Total Submission(s): 2648 Accepted Submission(s): 1275 |
Problem Description
一次生日Party可能有p人或者q人参加,现准备有一个大蛋糕.问最少要将蛋糕切成多少块(每块大小不一定相等),才能使p人或者q人出席的任何一种情况,都能平均将蛋糕分食.
|
Input
每行有两个数p和q.
|
Output
输出最少要将蛋糕切成多少块. |
Sample Input
2 3 |
Sample Output
4
|
经典题hdu 1722 Cake
最新推荐文章于 2020-02-07 15:21:14 发布