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 yasirnabil534 Cpp 0.00s
02 Bisnu039 Cpp 0.00s
03 sajjad_h Cpp 0.00s
04 sbs25 Cpp 0.00s
05 mansura C 0.00s
06 iammarajul Cpp 0.00s
07 The_Viper Cpp 0.00s
08 JubayerSohel Cpp14 0.00s
09 atrahman2012 Cpp 0.00s
10 KM_Muntasir Cpp14 0.00s
11 rfnamd_ju Cpp 0.00s
12 ms_login Cpp14 0.00s
13 Anikcsejnu Cpp 0.00s
14 mepromee Cpp 0.00s
15 Md_Abid Cpp 0.00s
16 haliban_25 C 0.00s
17 rhssinister53 Cpp 0.00s
18 soumitro_cse1604114 Cpp 0.00s
19 Nayef_Shuvo Cpp14 0.00s
20 afrineva C 0.00s
21 The_Musketeer Cpp 0.00s
22 lotuseater C 0.00s
23 MHR_MMAR Cpp 0.00s
24 leenaiitju Cpp 0.00s
25 ChowdhuryAsif Cpp 0.00s
26 fncse Cpp 0.00s
27 Salam_35s Cpp 0.00s
28 souravahmed C 0.00s
29 kabbya Cpp 0.00s
30 hanian Cpp 0.00s
31 shishir09 Cpp14 0.00s
32 Anik_Modak Cpp 0.00s
33 rifa C 0.00s
34 badhansen123 Cpp 0.00s
35 Vega_CSE Cpp 0.00s
36 Mahim_1703003 C 0.00s
37 tipu721 Cpp 0.00s
38 Nayem_ Cpp14 0.00s
39 darXtar C 0.00s
40 kamran_11b Cpp14 0.00s
41 marayhan C 0.00s
42 Ron6164 Cpp 0.00s
43 dhaliaditi C 0.00s
44 SakibAlamin Cpp14 0.00s
45 MoHiUdDiN1 Cpp 0.00s
46 duronto20 Cpp 0.00s
47 suptimusfika C 0.00s
48 rakibulhasanmrh Cpp 0.00s
49 Chayti_Saha98 Cpp 0.00s
50 shuvo_cse27 C 0.00s

Your feedback is our precious!

Or call +88 02 9853138 for support