【初心者】課題をクリアしていくスレ【講習会】
at GAMEDEV
299:HSPで素数
04/07/10 08:28 gc5EpECZ.net
#include "hspext.as"
False=0:True=1:count++:i=3
mes "計算中......"
while count<1000
sosu=True
j=3
emsqr chk,i
chk=chk>>4
while j<=chk
if (i \ j)=0 {
sosu=False
_break
}
j=j+2
wend
if sosu=True {
// cls
// mes i
EndNum=i
count++
}
i=i+2
gettime NowTime, 6
if (NowTime!=BeforeTime) {
BeforeTime=NowTime
wait 1
}
wend
mes "計算終了。"+count+"個目の素数は"+EndNum+"です。"
stop mes
次ページ続きを表示1を表示最新レス表示スレッドの検索類似スレ一覧話題のニュースおまかせリスト▼オプションを表示暇つぶし2ch
3915日前に更新/292 KB
担当:undef