312 FOR M=1 TO K-1