sausage

题解【KUSAC

感情迁移 提交于 2020-04-12 12:22:58
原题链接: Link 前言 一眼看到这题感觉没爬完,然后编者就去 SPOJ 看了一眼,发现确实没爬完 ... 题意简述 给你 \(n\) 个香肠,有 \(m\) 位品尝者,你要切多少刀才能让每位品尝者都吃到同样分量的香肠。输出切多少刀。 附上英文完整题面,由于编者被禁言了,希望管理员在审核的时候加上。 Mirko has given up on the difficult coach job and switched to food tasting instead. Having skipped breakfast like a professional connoisseur, he is visiting a Croatian cured meat festival. The most renowned cook at the festival, Marijan Bajs, has prepared N equal sausages which need to be distributed to M tasters such that each taster gets a precisely equal amount. He will use his trusted knife to cut them into pieces. In order to elegantly