DCP-564: Divide and Rule Back to All Problems

Easy Beginners Problems > Implementation

**Divide and rule** policy developed by British. It’s like make a clash between two friends regarding a simple matter and then enjoy the happenings. So here we are going to experience another “Divide and Rule” policy which will be an interesting I swear. So here I will give you a number **N** and you need to find the lowest positive integer of **N** digits that will be divisible by **3**. If you can do this simple division correctly, trust me you have the ability to rule your world. So go for it. Input: ------ Input starts with an integer **T** that denotes the number of test cases. Each of the next T lines contains an integer **N** as described above. Constraints: --------------- 1<=**T**<=100<br> 1<=**N**<=1000 Output: ------- For each of the test cases print the lowest integer divisible by **3**. Sample Input ------------ 1 1 Sample Output ------------- 3

Problem Setter:

Avik Sarkar

Please login to submit solution to this problem.

Problem Limits

Language Time Limit (seconds)
C 0.50
C++ 0.50
C++14 0.50
C# 1.00
Go 1.00
Java 1.00
JavaScript 1.00
Objective-C 1.00
Perl 1.00
PHP 1.00
Python 1.00
Python3 1.00
Ruby 1.00
VB.Net 1.00

Problem Stats




# User Language Timing
01 duronto20 Cpp 0.00s
02 badhansen123 Cpp 0.00s
03 mhiceiuk Cpp 0.00s
04 Pure_Protea Cpp14 0.00s
05 shishir09 Cpp14 0.00s
06 sajjad_h Cpp 0.00s
07 The_Viper Cpp 0.00s
08 Md_Abid Cpp 0.00s
09 yasirnabil534 Cpp 0.00s
10 Anikcsejnu Cpp 0.00s
11 rmahbub63 C 0.00s
12 feodorv C 0.00s
13 Chayti_Saha98 Cpp 0.00s
14 leenaiitju Cpp 0.00s
15 JubayerSohel Cpp14 0.00s
16 sbs25 Cpp 0.00s
17 The_Musketeer Cpp 0.00s
18 fncse Cpp 0.00s
19 mepromee Cpp 0.00s
20 SakibAlamin Cpp14 0.00s
21 haliban_25 C 0.00s
22 Redwan Cpp 0.00s
23 iammarajul Cpp 0.00s
24 Bisnu039 Cpp 0.00s
25 soumitro_cse1604114 Cpp 0.00s
26 kabbya Cpp 0.00s
27 kamran_11b Cpp14 0.00s
28 rakibulhasanmrh Cpp 0.00s
29 atrahman2012 Cpp 0.00s
30 KM_Muntasir Cpp14 0.00s
31 ChowdhuryAsif Cpp 0.00s
32 Nayeem017 C 0.00s
33 Anik_Modak Cpp 0.00s
34 hk_mehedi Cpp 0.00s
35 31_ipn Cpp 0.00s
36 Sohelr360 Cpp 0.00s
37 souravahmed C 0.00s
38 MoHiUdDiN1 Cpp 0.00s
39 rhssinister53 Cpp 0.00s
40 sabbir123 Cpp 0.00s
41 rfnamd_ju Cpp 0.00s
42 MHR_MMAR Cpp 0.00s
43 Mahfuz98 Cpp14 0.00s
44 armancse4 Cpp 0.00s
45 asmatikur C 0.00s
46 Nayef_Shuvo Cpp14 0.00s
47 suptimusfika C 0.00s
48 Salam_35s Cpp 0.00s
49 lotuseater C 0.00s
50 Datta Cpp 0.00s

Your feedback is our precious!

Or call +88 02 9853138 for support