declare @t table (id int,value int)
insert @t select 1,5 union all select 2,6 union all select 3,15
declare @max int
select @max=max(value) from @t
declare @i int
select @i=1
while exists (select 1 from @t where @i*@max % value <> 0)
set @i = @i + 1
select @i*@max as 最小公倍數
/*
最小公倍數
-----------
30
*/
如何求最小公倍數
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
N網下載mod方法: 20240614親測好使
https://www.bilibili.com/video/BV1k8411575T/?vd_source=d68ed178f151e80fea1e02efd205802c