DCP-262: Again Binary Back to All Problems

Beginner Beginners Problems > Ad-hoc


**Mithun Kumar Pk** an honorable teacher of World University of Bangladesh( WUB ) . He is also a trainer in WUB Programming Group. One day he arranged a contest for his students and all the problems of that contest was prepared by himself. **Pranto** is a lazy programmer of his programming team. When pranto saw the first problem he was shocked. The problem statement was Given: X=( (2^N) - 2^(N-(N-1)) ) Convert X from decimal to binary Pranto is weak in this type conversion. Now your task is to help him to solve the above problem. Input: ------ Input starts with an integer **T (1<=T=20)**, denoting the number of test cases. Each case contains an integer **N (1≤ N ≤ 100)** as shown in problem statement. See sample input and output for more details. . Output: ------- For each input calculate X and print N and SPACE then the binary value of X.The output may not fit in 64bit integer range, so always print only the last three digits padding leading zeros if requires. Output format will be like this: [N][SPACE][Last 3 digits of X] Sample Input ------------ 2 1 2 Sample Output ------------- 1 000 2 010


Problem Setter:

Md. Nazmul H Pranto

Please login to submit solution to this problem.

Problem Limits

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

Problem Stats

168/484

Solve/Submission

Ranking

# User Language Timing
01 Double_O Cpp14 0.00s
02 nuhu_iu Cpp14 0.00s
03 imranziad Cpp14 0.00s
04 swapnilsaha Cpp14 0.00s
05 ksohan Cpp14 0.00s
06 Zeronfinity Cpp14 0.00s
07 duronto20 Cpp14 0.00s
08 Digonta Cpp14 0.00s
09 xpo6 Cpp14 0.00s
10 I_See_You Cpp14 0.00s
11 PKP_007 Cpp14 0.00s
12 imunir Cpp14 0.00s
13 badhansen123 Cpp14 0.00s
14 shaft Cpp14 0.00s
15 subhashis_cse Cpp14 0.00s
16 KIRIN_36 Cpp14 0.00s
17 sayedgkm Cpp14 0.00s
18 kazinayeem Cpp14 0.00s
19 habib_rahman Cpp14 0.00s
20 abinash Cpp14 0.00s
21 mamun4122 Cpp14 0.00s
22 jayanto Cpp14 0.00s
23 Tanmoy1228 Cpp14 0.00s
24 anowar1112 Cpp14 0.00s
25 njrafi Cpp14 0.00s
26 Core_i14 Cpp14 0.00s
27 Saimum_140128 Cpp14 0.00s
28 fsshakkhor Cpp14 0.00s
29 yakin Cpp14 0.00s
30 as_couple Cpp14 0.00s
31 asad_IT Cpp14 0.00s
32 Rijoanul_Shanto Cpp14 0.00s
33 haasib Cpp14 0.00s
34 Nazmul_WUB Cpp14 0.00s
35 kamrulashraf Cpp14 0.00s
36 pin2paul Cpp14 0.00s
37 tariqiitju Cpp 0.00s
38 sazal_dev Cpp14 0.00s
39 7Mahfuz Cpp14 0.00s
40 reshan13 Cpp14 0.00s
41 astrolion7 Cpp14 0.00s
42 arabin Cpp14 0.00s
43 ronok_cse Cpp 0.00s
44 shamimjucse Cpp14 0.00s
45 Masum_ice Cpp14 0.00s
46 Pure_Protea Cpp14 0.00s
47 maxhasan Cpp14 0.00s
48 Arpan_cse_2k14 Cpp14 0.00s
49 saiful130104 Cpp14 0.00s
50 Ishrak Cpp14 0.00s
Feedback

Your feedback is our precious!



Or call +88 02 9853138 for support