Learn Tech Skills from Scratch @ Scaler EDGE # Total Moves For Bishop!

Problem Description

Given the position of a Bishop (A, B) on an `8 * 8` chessboard.

Your task is to count the total number of squares that can be visited by the Bishop in one move.

The position of the Bishop is denoted using row and column number of the chessboard.

Problem Constraints

1 <= A, B <= 8

Input Format

First argument is an integer A denoting the row number of the bishop.

Second argument is an integer B denoting the column number of the bishop.

Output Format

Return an integer denoting the total number of squares that can be visited by the Bishop in one move.

Example Input

Input 1:

``` A = 4
B = 4
```

Example Output

Output 1:

``` 13
```

NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a doubt? Checkout Sample Codes for more details. Hints
• Hint 1
• Solution Approach
• Complete Solution
{"ft_lang_label":"__label__en","ft_lang_prob":0.8515826,"math_prob":0.93594277,"size":794,"snap":"2021-04-2021-17","text_gpt3_token_len":192,"char_repetition_ratio":0.13417721,"word_repetition_ratio":0.147651,"special_character_ratio":0.23803526,"punctuation_ratio":0.10843374,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.95973635,"pos_list":[0,1,2,3,4,5,6,7,8],"im_url_duplicate_count":[null,null,null,null,null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-01-20T07:16:46Z\",\"WARC-Record-ID\":\"<urn:uuid:02f39997-6760-47b2-bcc1-e5b2bf61ce3b>\",\"Content-Length\":\"108656\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:eb16f253-9225-43f1-b406-87fe93c06e96>\",\"WARC-Concurrent-To\":\"<urn:uuid:d554a7ad-c6f8-4fac-a743-e6e09f9963f1>\",\"WARC-IP-Address\":\"34.214.166.89\",\"WARC-Target-URI\":\"https://www.interviewbit.com/problems/total-moves-for-bishop/\",\"WARC-Payload-Digest\":\"sha1:RRMIEQ752KSM6MQOMSFCHTTTF6N2HQ73\",\"WARC-Block-Digest\":\"sha1:WKI4KZXS7MJXIZORJXVWTL3ODZLM7N6H\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-04/CC-MAIN-2021-04_segments_1610703519923.26_warc_CC-MAIN-20210120054203-20210120084203-00488.warc.gz\"}"}