摘要:
Kids like candies, so much that they start beating each other if the candies are not fairly distributed. So on your next party, you better start think 阅读全文
摘要:
Kids like candies, so much that they start beating each other if the candies are not fairly distributed. So on your next party, you better start think 阅读全文
摘要:
The Sky is Sprite. The Birds is Fly in the Sky. The Wind is Wonderful. Blew Throw the Trees Trees are Shaking, Leaves are Falling. Lovers Walk passing 阅读全文
摘要:
Given two integers, a and b, you should check whether a is divisible by b or not. We know that an integer a is divisible by an integer b if and only i 阅读全文
摘要:
两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清楚对方的特征,也没有约定见面的具体位置。不过青蛙们都是很乐观的,它们觉得只要一直朝着某个方向跳下去,总能碰到对 阅读全文
摘要:
对于 ax+by=gcd(a,b) 这样的方程,可以用扩展欧几里得算法exgcd求出一组通解。 根据欧几里得求gcd: gcd(a,b)=gcd(b,a%b) 可得 bx+(a%b)y=gcd(b,a%b) 根据 a%b=a−(a/b)∗b 可得 bx+ay−(a/b)b∗y=gcd(b,a%b) 阅读全文
|