Easy Beginners Problems > Ad-hoc

Given **x** , print the left-most decimal digit of **f(x)** with sign. if x is a odd number then f(x) = (-1) * ( 2 ^ x ) , Otherwise f(x) = 2 ^ x . **note :** **2 ^ x** means, **xth** power of **2**. Input: ------ Input starts with an integer **T (1<=1000)**, denoting the number of test cases. Each case contains an integer **x (1 ≤ x ≤ 60)** . Output: ------- For each case of input, output the left-most decimal digit of **f(x)**. Sample Input ------------ 3 1 2 10 Sample Output ------------- -2 +4 +1

Ashini Singha

Language |
Time Limit (seconds) |

C | 1.00 |

C++ | 1.00 |

C++14 | 1.00 |

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 |

Solve/Submission

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

01 | Sarwar05 | Cpp14 | 0.00s |

02 | _c_k_r_ | Cpp14 | 0.00s |

03 | prottoy919 | Cpp14 | 0.00s |

04 | afzalul | Cpp14 | 0.00s |

05 | shamimjucse | Cpp14 | 0.00s |

06 | prodipdatta7 | Cpp14 | 0.00s |

07 | ____ | Cpp14 | 0.00s |

08 | a_rahman | Cpp14 | 0.00s |

09 | Pure_Protea | Cpp14 | 0.00s |

10 | Islam_Rafat | Cpp14 | 0.00s |

11 | ovis96 | Cpp14 | 0.00s |

12 | 7Mahfuz | Cpp14 | 0.00s |

13 | hrOarr | Cpp14 | 0.00s |

14 | Chayti_Saha98 | Cpp14 | 0.00s |

15 | badhansen123 | Cpp14 | 0.00s |

16 | Rajan_sust | Cpp14 | 0.00s |

17 | Bruteforcekid | Cpp14 | 0.00s |

18 | Zayed | Cpp14 | 0.00s |

19 | plab0n | Cpp14 | 0.00s |

20 | madcoder | Cpp14 | 0.00s |

21 | kzvd4729 | Cpp14 | 0.00s |

22 | MRITuhin | Cpp14 | 0.00s |

23 | Masum_ice | Cpp14 | 0.00s |

24 | murad_al_wajed | Cpp14 | 0.00s |

25 | kissu_pari_na | Cpp14 | 0.00s |

26 | shailyroy | Cpp14 | 0.00s |

27 | rashidulhasan777 | Cpp14 | 0.00s |

28 | mahjabinmeem | Cpp14 | 0.00s |

29 | saiful130104 | Cpp14 | 0.00s |

30 | Mr_KAJOL | Cpp14 | 0.00s |

31 | Samiha_23 | Cpp14 | 0.00s |

32 | faceless_void | Cpp14 | 0.00s |

33 | alif_biswas | Cpp14 | 0.00s |

34 | _GhOstMan_ | Cpp14 | 0.00s |

35 | mahbub07 | Cpp14 | 0.00s |

36 | showmic | Cpp14 | 0.00s |

37 | fearless_hasan | Cpp14 | 0.00s |

38 | shahedjamil108 | Cpp14 | 0.00s |

39 | RAKIBUL_HOSSAIN | Cpp14 | 0.00s |

40 | ATIK161 | Cpp14 | 0.00s |

41 | cse_nazmul | Cpp14 | 0.00s |

42 | Gang_Of_Three_01 | Cpp14 | 0.00s |

43 | bug_is_everywhere | Cpp14 | 0.00s |

44 | mrinmoi | Cpp14 | 0.00s |

45 | mir003 | Cpp14 | 0.00s |

46 | pulak_ict_mbstu | Cpp14 | 0.00s |

47 | alamin__7 | Cpp14 | 0.00s |

48 | arafat_hasan | Cpp14 | 0.00s |

49 | monir769 | Cpp14 | 0.00s |

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