Divisibility by 999
##### Submissions: 892   Accuracy: 41.88%   Difficulty: Easy   Marks: 2

You are given an n-digit large number, you have to check whether it is divisible by 999 without dividing or finding modulo of number by 999.

Input:
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case contains an string denoting the number.

Output:
Print "Divisible" (without quotes) if the number is divisible by 999.
Print "Not divisible" (without quotes) if the number is not divisible by 999.

Constraints:
1<=T<=10^5
1<=length of string<=10^9

Example:
Input:

2
1998
999999999

Output:
Divisible
Not divisible

#### ** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Ayush Govil
Author: Ayush Govil 1

If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.
{"ft_lang_label":"__label__en","ft_lang_prob":0.83512586,"math_prob":0.68115616,"size":741,"snap":"2019-51-2020-05","text_gpt3_token_len":181,"char_repetition_ratio":0.15196744,"word_repetition_ratio":0.034188036,"special_character_ratio":0.2537112,"punctuation_ratio":0.10489511,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.957953,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-12-05T20:26:29Z\",\"WARC-Record-ID\":\"<urn:uuid:991c3ac8-16a1-4e89-8931-6bc85221633d>\",\"Content-Length\":\"102880\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:76344192-7709-4b92-b038-e3cb6be28d61>\",\"WARC-Concurrent-To\":\"<urn:uuid:553ca0c3-369f-4d8f-bd07-9e0cf6760929>\",\"WARC-IP-Address\":\"104.96.221.72\",\"WARC-Target-URI\":\"https://practice.geeksforgeeks.org/problems/divisibility-by-999/0\",\"WARC-Payload-Digest\":\"sha1:3MFOABWFO3ZCLL6OPGLBJ7ADQADNI7YP\",\"WARC-Block-Digest\":\"sha1:T6O76PSF7B5ZRVWKUQXGHNX5SKBSQ2UA\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-51/CC-MAIN-2019-51_segments_1575540482038.36_warc_CC-MAIN-20191205190939-20191205214939-00422.warc.gz\"}"}