This is my code |
送交者: 零加一中 2008月11月27日10:59:45 於 [靈機一動] 發送悄悄話 |
回 答: 考你一考 由 綠豆湯 於 2008-11-19 20:57:17 |
array y{9}; /* Input are y(1) ... y(9)*/
array x{9}; do i = 1 to 9; x(i) = 0; end; do i = 1 to 9; x(y(i)) = x(y(i)) + 1; end; z = 1; do i = 1 to 9; z = z * x(i); end; If z = 0, there is repaet. |
|
|
|
|
實用資訊 | |