Comment detail

2^i * 3^j * 5^k なる整数 (Nested Flatten)

#7639を参考に移植。for文がないのがきつい・・・

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
limit=100
n=0
i=1
(n<limit)の間
    tmp=i
    (tmp%2=0)の間,tmp=tmp/2
    (tmp%3=0)の間,tmp=tmp/3
    (tmp%5=0)の間,tmp=tmp/5
    もし(tmp=1)ならば
        iを表示
        n=n+1
    i=i+1

Index

Feed

Other

Link

Pathtraq

loading...