In this problem, you have to find the last digit of 9^N. Be careful N would be a very large number. ![enter image description here][1] **Input :** First line of the input will consist of an integer which represent the test case T (0 < T <= 1001). Each test case contains an integer N (0 <= N <= 10^9). **Output :** For every test case, print the last digit of 9^N. **Sample Input:** 3 1 2 3 **Sample Output:** 9 1 9 [1]: https://s3-ap-southeast-1.amazonaws.com/devskillimagestorage/questionimages/3275637b-c325-ca8d-e79b-08d444daed49_f622b287abdf4d45a0842b77891d949d_W243xH243.png

Badhan Sen

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 |

Solve/Submission

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

01 | rana_cse | Cpp14 | 0.00s |

02 | emrul | Cpp14 | 0.00s |

03 | robin_aust | Cpp14 | 0.00s |

04 | Roll_Number_27 | Cpp14 | 0.00s |

05 | Islam_Rafat | Cpp14 | 0.00s |

06 | moshiur_cse15 | Cpp14 | 0.00s |

07 | Najat | Cpp14 | 0.00s |

08 | haasib | Cpp14 | 0.00s |

09 | The_Viper | Cpp14 | 0.00s |

10 | anjarul | Cpp14 | 0.00s |

11 | seyedssz | Cpp14 | 0.00s |

12 | trifiasco | Cpp14 | 0.00s |

13 | ____ | Cpp14 | 0.00s |

14 | Ramprosad | Cpp14 | 0.00s |

15 | rifat_cse | Cpp14 | 0.00s |

16 | showmic | Cpp14 | 0.00s |

17 | ash12 | Cpp14 | 0.00s |

18 | ww105060 | Cpp14 | 0.00s |

19 | MAD_coder | Cpp14 | 0.00s |

20 | Jubayer_Hasan | Cpp14 | 0.00s |

21 | Jisancse | Cpp14 | 0.00s |

22 | kakarotto | Cpp14 | 0.00s |

23 | myhobby | Cpp14 | 0.00s |

24 | SKL12 | Cpp14 | 0.00s |

25 | prodipdatta7 | Cpp14 | 0.00s |

26 | Arpan_cse_2k14 | Cpp14 | 0.00s |

27 | The_mover | Cpp14 | 0.00s |

28 | maxhasan | Cpp14 | 0.00s |

29 | smimran | Cpp14 | 0.00s |

30 | FahimSifnatul | Cpp14 | 0.00s |

31 | Atik_Ahamed | Cpp14 | 0.00s |

32 | noob_programmer | Cpp14 | 0.00s |

33 | pulak_ict_mbstu | Cpp14 | 0.00s |

34 | Knight_King | Cpp14 | 0.00s |

35 | jabertuhin | Cpp14 | 0.00s |

36 | sakib_ruet_13 | Cpp14 | 0.00s |

37 | nabil_053 | Cpp14 | 0.00s |

38 | Anubis | Cpp14 | 0.00s |

39 | Santho07 | Cpp14 | 0.00s |

40 | Rajan_sust | Cpp14 | 0.00s |

41 | Indro_BU | Cpp14 | 0.00s |

42 | Key_logger | Cpp14 | 0.00s |

43 | nakib_ruet | Cpp14 | 0.00s |

44 | shuvo_iu | Cpp14 | 0.00s |

45 | asib | Cpp14 | 0.00s |

46 | AlaminJust | Cpp14 | 0.00s |

47 | Aman_khan | Cpp14 | 0.00s |

48 | anik_JU | Cpp14 | 0.00s |

49 | jewel_ | Cpp14 | 0.00s |

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