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 | maxhasan | Cpp14 | 0.00s |

02 | habib_rahman | Cpp14 | 0.00s |

03 | MRITuhin | Cpp14 | 0.00s |

04 | kamrulashraf | Cpp14 | 0.00s |

05 | imranziad | Cpp14 | 0.00s |

06 | Zeronfinity | Cpp14 | 0.00s |

07 | shihabsarar29 | Cpp14 | 0.00s |

08 | fsshakkhor | Cpp14 | 0.00s |

09 | Hasinur_ | Cpp14 | 0.00s |

10 | Double_O | Cpp14 | 0.00s |

11 | ovis96 | Cpp14 | 0.00s |

12 | I_See_You | Cpp14 | 0.00s |

13 | adamantium | Cpp14 | 0.00s |

14 | Arpan_cse_2k14 | Cpp14 | 0.00s |

15 | kitorp | Cpp14 | 0.00s |

16 | ksohan | Cpp14 | 0.00s |

17 | shaft | Cpp14 | 0.00s |

18 | xpo6 | Cpp14 | 0.00s |

19 | seyedssz | Cpp14 | 0.00s |

20 | anowar1112 | Cpp14 | 0.00s |

21 | astrolion7 | Cpp14 | 0.00s |

22 | badhansen123 | Cpp14 | 0.00s |

23 | as_couple | Cpp14 | 0.00s |

24 | DynamicOvi | Cpp14 | 0.00s |

25 | Pure_Protea | Cpp14 | 0.00s |

26 | sajib_readdd | Cpp14 | 0.00s |

27 | Digonta | Cpp14 | 0.00s |

28 | PKP_007 | Cpp14 | 0.00s |

29 | mamun4122 | Cpp14 | 0.00s |

30 | sakib_muhit | Cpp14 | 0.00s |

31 | nuhu_iu | Cpp14 | 0.00s |

32 | haasib | Cpp14 | 0.00s |

33 | lsiddiqsunny | Cpp14 | 0.00s |

34 | Anikcsejnu | Cpp14 | 0.00s |

35 | Rijoanul_Shanto | Cpp14 | 0.00s |

36 | Sakhawat_CoU | Cpp14 | 0.00s |

37 | shamimjucse | 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 | kazinayeem | Cpp14 | 0.00s |

43 | Tanmoy1228 | Cpp14 | 0.00s |

44 | souravvv | Cpp14 | 0.00s |

45 | moshiur_cse15 | Cpp14 | 0.00s |

46 | kzvd4729 | Cpp14 | 0.00s |

47 | sayedgkm | Cpp14 | 0.00s |

48 | priojeet_priyom | Cpp14 | 0.00s |

49 | jewel_ | Cpp14 | 0.00s |

50 | ____ | 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. :(