Skip to main content

SQUARING A NUMBER, UNIT AND LAST TWO DIGIT IN POWER OF ODD NUMBER TRICK


MUST READ APTITUDE TRICKS

             
     First of all to apply these tricks you will have to remember square of numbers from 1-30.


1* 1

2* 4

3* 9

4* 16

5* 25

6* 36

7* 49

8* 64

9* 81

10* 100


11* 121

12* 144

13* 169

14* 196

15* 225

16* 256

17* 289

18* 324

19* 361

20* 400


21* 441

22* 484

23* 529

24* 576

25* 625

26* 676

27* 729

28* 784

29* 841

30* 900  


 How to calculate the square of a number  close to 50.

 Tricks=  First find how much its excess or less from 50. 
              Like :  54( its 54-50=4 excess) 
                        46 (its 50-46=4 less)
                        72(its 72-50= 22 excess)
                        38(its 50-38=12 less)
                      

        In case of excess:  add these excess number to 25.........like 54,72 all are greater then 50.

                Like in case of 54 we will add 4 to 25 i.e 25+4=29
                Now square the excess number i.e 4^2=16
                    So finally square of 54^ will be= 2916



               In case of less :   subtract less number from 25........... like 46, 38 all are less then 50.
                        
                Like in case of 46 we will subtract 4 from 25 i.e 25-4=21
                Now square the less number i.e 4^2=16
                    So finally square of 46^2 will be= 2116    

                 -----------------------------------------------------------------------------------------

              Now square of number close to 100
              Its very simple, just add the excess or subtract the less number from itself then calculate the square of excess or less number and add it at last.

         Like 104, 4 excess from 100 so add 4 to 104 i.e 104+4=108.
                         and square of excess number i.e 4^2=16
            So finally square of 104^2=10816.

       Now lets calculate the square of 96.
           Its 4 less from 100 so  we will subtract 4 from it i.e 96-4=92
           Square less number i.e 4^2=16
          So finally square of 96^2=9216

---------------------------------------------------------------------------------------


Now how to find unit digit of any number

          first note these idea that 
                                         
                    1^(any no)=1
                    5^(any no)=5
                    6^(any no)=6

                    4^(odd)=4
                    4^(even)=6

                    9^(odd)=9
                    9^(even)=1

                    And even number like (2,4,6,8)^4k=6
                    And odd number like (1,3,7,9)^4k=1
                                           Here 4k means multiple of 4.

Now find out the unit digit of 324^337
                    4^(odd)=4
             So answer will be 4.
            
        find out the unit digit of 2462^72
                      2^(4*18)=6
            So answer will be 6.
            find out the unit digit of 7^73376
                       Since 76 is divisible by 4 i.e 3376 is a multiple of 4.
                       So, 7^(4k)=1
                   So answer will be 1.


-------------------------------------------------------------------------------------------------------

Now Calculate last two digit.

              In case of number which have 1 at unit place, then the last two digit can be easily find out by keeping the unit place as 1 and multiply the decimal digit with unit digit of power.
          
          For example :
                               Last two digit of   3481^(7788)?
                               As i mentioned that unit digit will be 1 of any number containing 1 in its unit place.

                            Now decimal digit of number i.e 3481 is 8
                            Now unit digit of power i.e 7788 is 8
                             Now multiply these two number 8*8=64
                         So last two digit will be = 641

             -----------------------------------------------------------------------------

                     Now as we know that any odd number i.e 1,3,7,9 gives 1 at unit digit if power of number will be a multiple of 4 i.e 4k.

                  And after getting 1 at unit place we can easily find out the last two digit which is shown just above of it.

               Find last two digit of 13^44?
         
           Sol :  Now break power in a multiple of 4 i.e  4*11
                      Now (13^(4))^11
                               Now Calculate 13^4......
                             First calculate 13^2=169 only take last two digit of it.  i.e 69
                              Now calculate  69^2=excess number from 50 is 19 and 19^2=61
                 
                               So 13^4 gives 61 at last two digit                  

                Now 61^11=As unit digit is one so unit place will be 1 and we will multiply the decimal digit of number i.e 6 to the unit digit of power which is 1,          6*1=6
                     
                  So last two digit of 13^44=61 
   
                         
           * Find out the last two digit of 87^5?

                 To get the answer of it calculate 87^4 and then multiply it by 87 again, we will get your answer.
           

Popular posts from this blog

Bubble sort Implementation

Bubble sort  : In bubble sort ,we will select the 1st element and compare with all the remaining element, same process we will continue for all the elements as we are traveling the whole Array 2 times except the element which we have selected to compare with other elements but still it will be consider as n time.    So time complexity for bubble sort will be O(n^2).         space complexity for bubble sort will be O(1). // Bubble Sort class BubbleSort { public static void sort ( int [] array) { int n = array. length ; while ( true ) { boolean swapped = false; for ( int i = 0 ; i < n - 1 ; i++) { if (array[i + 1 ] < array[i]) { swap (array , i , i + 1 ) ; swapped = true; } } if (!swapped) break; } } private static void swap ( int [] array , int i , int j) { int temp = array[i] ;...

Object-Oriented Programming Concept in Java

OOPS( Object-Oriented Programming ) Concept in Java :   As we all know Java is Object Oriented programming language and what exactly it means in simple words to understand can be described as whatever is going to happen by Java , it will be based on some Object.  So next question can be what is Object ? , "Object is the representation or reference of Class to access its properties and use its behaviour ", now next is What is Class in java and answer to this question is "A class in java is the blueprint of Properties and Behaviours of it's own Object" as explained in my previous post  BASIC OVERVIEW OF JAVA  (SESSION 1)   Let's understand through an example : public class FirstJavaProgram { int firstNumber=10; int secondNumber=20;      public int sum(int fNum, int sNum){         return fNum+sNum;     }     public static void main(String[] args) {     //our logics ...

JAVA MEMORY LEAK, UTILISATION AND MONITORING USING JFR using Mission Control

JAVA MEMORY LEAK, UTILISATION AND MONITORING USING JFR using Mission Control Java flight recording(JFR) help us to analyse and find the root cause of any slowness in our program along with CPU usage , hot methods and garbage collection , profiling etc. To visualise we need to feed .jfr file to JDK mission control present in JDK bin folder. After successful compilation , we should run the program with below option which will generate the .jfr and feed to mission control.   command :  j ava -XX:+UnlockCommercialFeatures -XX:+FlightRecorder  -XX:StartFlightRecording=duration=200s,filename=flight.jfr -cp ./out/ path-and-class-name Below are some example to understand how this JFR can be helpful. 1. Lets consider we have created a java program in which we have used LinkList to store the elements and in same program we are using contains method inside a for loop of 1 million , in this case each time this contains method will be called then 1 million records will be sc...