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

Md. Nazmul H Pranto

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 |

Solve/Submission

# | User | Language | Timing |
---|---|---|---|

01 | Double_O | Cpp14 | 0.00s |

02 | Hasinur_ | Cpp14 | 0.00s |

03 | fsshakkhor | Cpp14 | 0.00s |

04 | ovis96 | Cpp14 | 0.00s |

05 | maxhasan | Cpp14 | 0.00s |

06 | kamrulashraf | Cpp14 | 0.00s |

07 | imranziad | Cpp14 | 0.00s |

08 | Zeronfinity | Cpp14 | 0.00s |

09 | shihabsarar29 | Cpp14 | 0.00s |

10 | habib_rahman | Cpp14 | 0.00s |

11 | kitorp | Cpp14 | 0.00s |

12 | shaft | Cpp14 | 0.00s |

13 | ksohan | Cpp14 | 0.00s |

14 | MRITuhin | Cpp14 | 0.00s |

15 | xpo6 | Cpp14 | 0.00s |

16 | as_couple | Cpp14 | 0.00s |

17 | DynamicOvi | Cpp14 | 0.00s |

18 | Pure_Protea | Cpp14 | 0.00s |

19 | sajib_readdd | Cpp14 | 0.00s |

20 | Digonta | Cpp14 | 0.00s |

21 | PKP_007 | Cpp14 | 0.00s |

22 | anowar1112 | Cpp14 | 0.00s |

23 | astrolion7 | Cpp14 | 0.00s |

24 | seyedssz | Cpp14 | 0.00s |

25 | haasib | Cpp14 | 0.00s |

26 | sakib_muhit | Cpp14 | 0.00s |

27 | nuhu_iu | Cpp14 | 0.00s |

28 | mamun4122 | Cpp14 | 0.00s |

29 | badhansen123 | Cpp14 | 0.00s |

30 | lsiddiqsunny | Cpp14 | 0.00s |

31 | kazinayeem | Cpp14 | 0.00s |

32 | Tanmoy1228 | Cpp14 | 0.00s |

33 | souravvv | Cpp14 | 0.00s |

34 | moshiur_cse15 | Cpp14 | 0.00s |

35 | kzvd4729 | Cpp14 | 0.00s |

36 | sayedgkm | Cpp14 | 0.00s |

37 | priojeet_priyom | Cpp14 | 0.00s |

38 | abinash | Cpp14 | 0.00s |

39 | Dinar | Cpp14 | 0.00s |

40 | subhashis_cse | Cpp14 | 0.00s |

41 | jayanto | Cpp14 | 0.00s |

42 | I_See_You | Cpp14 | 0.00s |

43 | adamantium | Cpp14 | 0.00s |

44 | Arpan_cse_2k14 | Cpp14 | 0.00s |

45 | swapnilsaha | Cpp14 | 0.00s |

46 | Anikcsejnu | Cpp14 | 0.00s |

47 | Rijoanul_Shanto | Cpp14 | 0.00s |

48 | Sakhawat_CoU | Cpp14 | 0.00s |

49 | shamimjucse | Cpp14 | 0.00s |

50 | jewel_ | Cpp14 | 0.00s |

Copyright © 2015-2016 Dev Skill.

Feedback
#### Your feedback is our precious!

## Thank you for providing feedback! Our developers will be happy :)

## Sorry there was a problem when submitting the feedback. Please try again. :(