templete_extgcd
来源:互联网 发布:发房源软件 编辑:程序博客网 时间:2024/05/22 17:37
#include <stdio.h>#include <string.h>#include <iostream>#include <string>using namespace std;typedef long long LL;int extgcd(int a, int b, LL &d, LL &x, LL &y){if (b == 0){d = a;x = 1;y = 0;}else{extgcd(b, a % b, d, y, x);y -= x * (a / b);}}int main(){LL x, y, d;extgcd(15, 6, d, x, y);cout << "gcd(a, b) = " << d << endl;cout << "x = " << x << endl;cout << "y = " << y << endl;system("pause");return 0;}
- templete_extgcd
- pthread_mutex_trylock
- Apache2 httpd.conf 配置
- 【iOS-Cocos2d游戏开发之三】CCScene切换的所有特效(28种)以及设置屏幕横竖屏!
- 软件度量都该度个啥?(5)——被吹得最多的六西格玛
- OCP-1Z0-052-V8.02-59题
- templete_extgcd
- Javascript 陷阱
- 视频采集上传存储下载带宽计算
- 【代码】PHP 脚本的技巧之动态创建图象
- jsp页面不识别EL表达式,显示效果为EL表达式自身字符串
- 英语词汇
- NSDate的基本知识
- maven YUI 压缩JS和CSS
- OCP 1Z0-053 Q188 -- 手工管理 SGA 参数