C题解
#include <stdio.h> int main() { int m, n, r; scanf("%d %d", &m, &n); while (n != 0) { r = m%n; m = n; n = r; } printf("%d", m); return 0; }
#include <stdio.h> int main() { int m, n, r; scanf("%d %d", &m, &n); while (n != 0) { r = m%n; m = n; n = r; } printf("%d", m); return 0; }
相关推荐