あ、これだと振る回数がsai+1になっちゃう。 for A=1 to sai でした