題目(斯倫貝謝 slb
給定兩個整數M和N
答案
初始化
index =
A[i] =
B[i] =
int begin =
int end =
然後
while(M !=
if(B[M] !=
begin = B[M];
end = index;
break;
}
B[M] = index;
A[index] = M*
M = M*
index++;
}
然後輸出結果就OK了
舉個例子
編號 余數 當前位
From:http://tw.wingwit.com/Article/program/sjjg/201405/30737.html