标签:color can 算法 scanf amp pen closed 公约数 view
【算法】欧几里德算法
#include<cstdio> int gcd(int a,int b) {return b==0?a:gcd(b,a%b);} int main() { int a,b; scanf("%d%d",&a,&b); printf("%d",gcd(a,b)); return 0; }
标签:color can 算法 scanf amp pen closed 公约数 view
原文地址:http://www.cnblogs.com/onioncyc/p/6910087.html