給定兩個數字,請得出它們的最大公因數
輸入說明 :
兩個整數 大於 0, 小於 231
輸出說明 :
最大公因數為一整數
範例輸入 :
12 15
範例輸出 :
3
出處 :
Jiangsir
http://zerojudge.tw/ShowProblem?problemid=a024
#include<stdio.h>
while(scanf("%d %d",&a,&b)!=EOF) |
全站熱搜
給定兩個數字,請得出它們的最大公因數
輸入說明 :
兩個整數 大於 0, 小於 231
輸出說明 :
最大公因數為一整數
範例輸入 :
12 15
範例輸出 :
3
出處 :
Jiangsir
http://zerojudge.tw/ShowProblem?problemid=a024
#include<stdio.h>
while(scanf("%d %d",&a,&b)!=EOF) |