当前位置:网站首页>An elegant program for Euclid‘s algorithm
An elegant program for Euclid‘s algorithm
2022-07-05 03:33:00 【大魔法师云中君】
// Euclid's algorithm for greatest common divisor
int euclidAlgorithm (int A, int B){
A=abs(A);
B=abs(B);
while (B!=0){
while (A>B) A=A-B;
B=B-A;
}
return A;
}
边栏推荐
- Zero foundation uses paddlepaddle to build lenet-5 network
- [system security] ten thousand words summary system virtualization container bottom layer principle experiment
- Flume configuration 4 - customize mysqlsource
- [summary of two registration methods]
- Necessary fonts for designers
- Smart pointer shared_ PTR and weak_ Difference of PTR
- [luat-air105] 4.1 file system FS
- [deep learning] deep learning reference materials
- Linux安装Redis
- Tencent cloud, realize image upload
猜你喜欢
1. Five layer network model
Sqoop command
Tiny series rendering tutorial
2.常见的请求方法
Utilisation simple de devtools
error Couldn‘t find a package.json file in “你的路径“
Hot knowledge of multithreading (I): introduction to ThreadLocal and underlying principles
Blue Bridge Cup single chip microcomputer -- PWM pulse width modulation
端口,域名,协议。
程序员的视力怎么样? | 每日趣闻
随机推荐
Mongodb common commands
[groovy] string (string injection function | asBoolean | execute | minus)
Jd.com 2: how to prevent oversold in the deduction process of commodity inventory?
Devtools的簡單使用
[summary of two registration methods]
Azkaban概述
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
MySQL winter vacation self-study 2022 11 (9)
This + closure + scope interview question
001 chip test
Smart pointer shared_ PTR and weak_ Difference of PTR
有個疑問 flink sql cdc 的話可以設置並行度麼, 並行度大於1會有順序問題吧?
In MySQL Association query, the foreign key is null. What if the data cannot be found?
【软件逆向-基础知识】分析方法、汇编指令体系结构
Monitoring web performance with performance
LeetCode146. LRU cache
线程基础知识
Linux Installation redis
IPv6 experiment
Une question est de savoir si Flink SQL CDC peut définir le parallélisme. Si le parallélisme est supérieur à 1, il y aura un problème d'ordre?