99 個 Elm 問題/問題 32
外觀
確定兩個正整數的最大公約數。使用歐幾里得演算法。
# # # 這是一個存根 # # #
Example in Elm:
import Html exposing (text)
import List
f : Int -> Int
-- your implementation goes here
main = text (toString (f 0))
結果
4
確定兩個正整數的最大公約數。使用歐幾里得演算法。
# # # 這是一個存根 # # #
Example in Elm:
import Html exposing (text)
import List
f : Int -> Int
-- your implementation goes here
main = text (toString (f 0))
結果
4