$0=N+1 $1=N $2=N*N $3=N*K while$1<$0 $0=$1 $4=$1*$1 $1=2*$1 $4=$4+$2 $1=$1+$3 $1=$4/$1 end $1=$1+N return$1 # WA想定