--- tags: KATA --- Minesweeper 踩地雷 === ###### tags: `KATA` [原文連結](https://codingdojo.org/kata/Minesweeper/) # Description 給定一組M*N, 0 < M, N <= 100 , 用來表示地圖的大小. test case會給定M,N; 以及一組地圖, ```*```表示地雷, ```.```表示安全區快. 程式掃雷完的結果, 也是匯出M*N的地圖, 但原本的```.```區塊要變成去計算出周圍的九宮格內有幾個地雷, 數量0<=X<=8 再來與expected比對 # Test Cases ## case 1 ``` 4 4 *... .... .*.. .... ``` ``` *100 2210 1*10 1110 ``` ## case 2 ``` 3 5 **... ..... .*... ``` ``` **100 33200 1*100 ``` # case 3 ``` 0 0 ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up