当前位置:网站首页>Zzuli:1062 greatest common divisor
Zzuli:1062 greatest common divisor
2022-07-02 05:29:00 【Don't explode】
Title Description
Enter two not greater than 10 Of 9 A positive integer to the power , Output its greatest common divisor .
Input
Enter two positive integers m and n, Space between data .
Output
Output an integer , Express m and n Maximum common divisor of .
The sample input Copy
4 6
Sample output Copy
2
Tips
Please refer to Euclid's theorem and the method of getting along with others .
#include <stdio.h>
int main()
{
int m,n,r;
scanf("%d%d",&m,&n);
while(m%n!=0)
{
r=m%n;
m=n;
n=r;
}
printf("%d",n);
return 0;
}
边栏推荐
- Paddlepaddle project source code
- ERP management system development and design existing source code
- 中小型项目手撸过滤器实现认证与授权
- 460. LFU 缓存 双向链表
- Online English teaching app open source platform (customized)
- Foreign trade marketing website system development function case making
- Gee: explore the change of water area in the North Canal basin over the past 30 years [year by year]
- Youth training camp -- database operation project
- A collection of commonly used plug-ins for idea development tools
- Fabric. JS gradient
猜你喜欢
Centos8 installation mysql8.0.22 tutorial
Gee series: unit 6 building various remote sensing indexes in Google Earth engine
Fabric.js 渐变
Gee: analyze the change of spatial centroid of remote sensing image [centroid acquisition analysis]
Gee: explore the change of water area in the North Canal basin over the past 30 years [year by year]
Using QA band and bit mask in Google Earth engine
Visual Studio导入
Gee dataset: chirps pentad high resolution global grid rainfall dataset
Principle and implementation of parallax effect
Innovation never stops -- the innovation process of nvisual network visualization platform for Excel import
随机推荐
Sliding window on the learning road
Gee series: unit 8 time series analysis in Google Earth engine [time series]
Feign realizes file uploading and downloading
Résumé de la collection de plug - ins couramment utilisée dans les outils de développement idea
Dark horse notes -- map set system
h5跳小程序
Youth training camp -- database operation project
Fabric.js IText设置指定文字的颜色和背景色
Fabric. JS iText superscript and subscript
Software testing learning - day 4
Fabric. JS upload local image to canvas background
Applet jumps to official account
视差特效的原理和实现方法
LeetCode 1175. Prime number arrangement (prime number judgment + Combinatorial Mathematics)
Generate QR code
JVM class loading mechanism
Gee series: Unit 2 explore datasets
Gee dataset: chirps pentad high resolution global grid rainfall dataset
数据库批量插入数据
Fabric.js 渐变