# DCP-243: The 9th Power Back to All Problems

Easy Math > Basic Math

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

### Problem Limits

 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

# 364/694

Solve/Submission

### Ranking

# User Language Timing
01 cse_nazmul Cpp14 0.00s
02 habib_rahman Cpp14 0.00s
03 shamiul_pust Cpp14 0.00s
04 rajdipsaha Cpp14 0.00s
05 rana_cse Cpp14 0.00s
06 shuvo_iu Cpp14 0.00s
07 ash12 Cpp14 0.00s
08 myhobby Cpp14 0.00s
09 inactivecoder Cpp14 0.00s
10 Dexter Cpp14 0.00s
11 Roll_Number_27 Cpp14 0.00s
12 shabbirdu2012 Cpp14 0.00s
13 ProKawsar Cpp14 0.00s
14 ArifKhanShubro Cpp14 0.00s
15 shawon100 Cpp14 0.00s
16 zitul_mahmud Cpp14 0.00s
17 MAHRahat Cpp14 0.00s
18 Puja1409 Cpp14 0.00s
19 Gang_Of_Three_01 Cpp14 0.00s
20 HR_Habib Cpp14 0.00s
21 MI47 Cpp14 0.00s
22 sakib_ruet_13 Cpp14 0.00s
23 ssavi Cpp14 0.00s
24 absa1am Cpp14 0.00s
26 subhashis_cse Cpp14 0.00s
27 aseem_cu Cpp14 0.00s
28 _Gambit_ Cpp14 0.00s
29 yakin Cpp14 0.00s
30 jabertuhin Cpp14 0.00s
31 Nazmul_WUB Cpp14 0.00s
32 Trusted_Frustrated Cpp14 0.00s
33 rabel Cpp14 0.00s
34 mamunparvez Cpp14 0.00s
35 nakib_ruet Cpp14 0.00s
36 Jubayer_Hasan Cpp14 0.00s
37 uiu_nabil Cpp14 0.00s
38 haasib Cpp14 0.00s
39 showmic Cpp14 0.00s
40 zyyxxx Cpp14 0.00s
41 Jisancse Cpp14 0.00s
42 emrul Cpp14 0.00s
43 muhaimin Cpp14 0.00s
44 shimul_hossain Cpp14 0.00s
45 msiamn Cpp14 0.00s
46 rifat_cse Cpp14 0.00s
47 Yeasin10A Cpp14 0.00s
48 FahimSifnatul Cpp14 0.00s
49 tariqiitju Cpp14 0.00s
50 Zeseya Cpp14 0.00s
Feedback