Èçî}
ÔÚ¾W·ÉÏ¿´µ½Ò»‚€ÎÄÕÂÊÇêPì¶Åä·½µÄ£¬
2¡¢Ð½¨Ò»³ÌÐò£¬ÔO¶¨×xŒ‘Åä·½µØÖ·£¬éL¶ÈÔOžé10£¬½M”µÔOžé100
3¡¢×ƒÁ¿˜Ëºž±íÖУº TOP @100 NO @200 TEMP_1 @300 TEMP_2 @301 TEMP_3 @302
4¡¢ÖÆ×÷Ê®‚€”µÖµÝ”È룬žé@0~@9,ÓÃÓÚÝ”È딵“þ£»
5¡¢ÖÆ×÷Ò»‚€”µÖµÝ”È룬žéNO,ÓÃÓÚßx“ñŒ¢ËùÝ”ÈëµÄ”µ“þ·Åµ½Åä·½”µ“þµÄʲôλÖÃ
6¡¢ÖÆ×÷Ò»”µÖµï@ʾ£¬žéTOP£¬ÓÃÓÚï@ʾĿǰ¹²ÓжàÉÙ½MÅä·½£»
7¡¢ÖÆ×÷Ò»±£³ÖÐÍ°´âo£¬ÃüÃûžé„h³ý°´âo£¬ÓÃÓÚŒ¢ßx¶¨µÄNO½M”µ“þ„h³ý£¬ „h³ý°´âoOFFºê£º IF NO > 0 THEN DO IF TOP > 0 THEN DO IF TOP > NO THEN DO TEMP_1 = ADD(NO, 1) TEMP_2 = SUB(TOP, NO) FOR TEMP_2 RCPNO = TEMP_1 BMOV(@30, RCPW0, 10) RCPNO = SUB(TEMP_1, 1) BMOV(RCPW0, @30, 10) TEMP_1 = ADD(TEMP_1, 1) NEXT ENDIF IF TOP >= NO THEN DO RCPNO = TOP FILL(RCPW0, 0, 10) TOP = SUB(TOP, 1) ENDIF ENDIF ENDIF END Ö÷Ҫ˼Ïëžé,Ê×ÏÈŒ¢NO+1½MµÄ”µ“þ±£´æµ½@30~@39ÖУ¬È»ºóŒ¢Æä±£´æµ½NO½MÖУ¬ÔÙŒ¢NO+2½MµÄ”µ“þ±£´æµ½@30~@39ÖУ¬È»ºóŒ¢Æä±£´æµ½NO+1½M ÖÐ,Ö±µ½×îºóÒ»½M
8¡¢ÖÆ×÷Ò»±£³ÖÐÍ°´âo£¬ÃüÃûžé²åÈë°´âo£¬ÓÃÓÚŒ¢@0~@9ÖеĔµ“þ²åÈëµ½Åä·½µÄNO½M£¬ÔNO½M¼°ÒÔºóµÄ”µ“þÏòºóÒÆ„Ó£¬ ²åÈë°´âoOFFºê£º IF NO > 0 THEN DO IF TOP >= NO THEN DO TEMP_1 = TOP TEMP_2 = SUB(TOP, NO) TEMP_2 = ADD(TEMP_2, 1) FOR TEMP_2 RCPNO = TEMP_1 BMOV(@30, RCPW0, 10) RCPNO = ADD(TEMP_1, 1) BMOV(RCPW0, @30, 10) TEMP_1 = SUB(TEMP_1, 1) NEXT RCPNO = NO BMOV(RCPW0, @0, 10) TOP = ADD(TOP, 1) ELSE DO RCPNO = NO BMOV(RCPW0, @0, 10) TOP = NO ENDIF ENDIF END Ö÷Ҫ˼Ïëžé£¬Ê×ÏÈŒ¢TOP½MµÄ”µ“þ±£´æµ½@30~@39ÖУ¬È»ºóŒ¢Æä·Åµ½TOP+1½MÖУ¬ÔÙŒ¢TOP-1½M·Åµ½TOP½MÖУ¬Ö±µ½NO½M·Åµ½NO+1½MÖУ¬È»ºóÔÙ Œ¢@0~@9µÄ”µ“þ·Åµ½NO½M¡£
9¡¢ÖÆ×÷Ò»±£³ÖÐÍ°´âo£¬ÃüÃûžéÌî³ä°´âo£¬ÓÃÓÚŒ¢@0~@9ÖеĔµ“þÌî³äµ½Åä·½µÄNO½M£¬ÆäËü”µ“þ²»×ƒ¡£ Ìî³ä°´âoOFFºê£º IF NO > 0 THEN DO RCPNO = NO BMOV(RCPW0, @0, 10) IF NO > TOP THEN DO TOP = NO ENDIF ENDIF END Ö÷Ҫ˼Ïëžé£¬Œ¢”µ“þ·Åµ½NO½M¡£
Õˆ†–¡¸×ƒÁ¿˜Ëºž±í¡¹ÊÇÒªÈçµ½ÔO¶¨ÄØ£¬ÕÒ²»µ½
ÖxÖx