ZJ d120
nlist:標記0~n,是否為質數
plist:質數清單
思考流程圖
graph TD;
建立0-n的質數表plist及nlist-->處理輸入值=nt=ni;
處理輸入值=nt=ni-->由nlist判斷-->nt非質數-->逐一plist因式分解ans+1-->輸出結果;
由nlist判斷-->nt為質數-->ans=1-->輸出結果;
Are you sure to leave this team?
Once you delete your team, all team notes will be deleted and cannot be recovered. Please ensure you've exported or transfered these notes.
Enter team name before deleting it:
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up