热门

最新

红包

立Flag

投票

同城

我的

发布
chenftli
橙子园
4 年前
truechenftli

要回家过年了,放松

我的假期日常
CSDN App 扫码分享
分享
评论
1
打赏
  • 复制链接
  • 举报
下一条:
Apple 描述: There are a box of apples,which contains N apples. You're going to give them to M person. It is required that everyone must be given a positive integer apple, and no one must have the same amount. If it can be done, output possible; otherwise output impossible. 输入: The first line contains a positive integer T(1≤T≤5)T(1≤T≤5)- the number of test cases. In each of the following T lines there are two positive integers N,M.(1≤N≤1000000,1≤M≤1000)N,M.(1≤N≤1000000,1≤M≤1000). 输出: For each test case output a line. If it can be done, output possible; otherwise output impossible. 翻译 有一箱苹果,总共有N个,你现在要分给M个人,要求每个人需要被分配到正整数T个苹果(1<=T<=5),不要求每个人分到同样数量的苹果,如果可以分配完,输出possible,不能则输出impossible. 输入 第一行包含一个正整数T(1≤T≤5),表示测试用例数量, 接下来T行输入两个正整数N,M(1≤N≤1000000,1≤M≤1000). 输出 每次测试输入一行,如果可以分配输出possible,否则输出impossible
立即登录