FZU 2102 Solve equation

http://acm.fzu.edu.cn/problem.php?pid=2102

一道看起来特别牛逼但是却很简单的题。给你一个等式A=K*B+d,给你A,B,C,C为当前进制数,让你求出满足等式的k与D.(k,d)

看似有进制转换跟着,但并不难,K为A/B(转换为10进制之后),d=A%B

之后就都懂了

`

include

include

include

include

define Max 2188

include

using namespace std;
int convert(int scale,int x)
{
int sum=1;
for(int i=0;i

你可能感兴趣的:(思维,FZU)