Power - Mod Power

  • + 0 comments

    I tried to keep in track the mentioned constraints but the condition does not operates. Any suggestion is acceptable.

    import math
    
    a=int(input())
    b=int(input())
    m=int(input())
    
    if a not in range(1,11) and a not in range(1,11) and m not in range(2,1001):
        print('Values out of contstraints')
    else:
        print(pow(a,b))
        print(pow(a,b) % m)