zoukankan      html  css  js  c++  java
  • Super A^B mod C

    Given A,B,C, You should quickly calculate the result of A^B mod C. (1<=A,C<=1000000000,1<=B<=10^1000000).

    Input

    There are multiply testcases. Each testcase, there is one line contains three integers A, B and C, separated by a single space.

    Output

    For each testcase, output an integer, denotes the result of A^B mod C.

    Sample Input

    3 2 4
    2 10 1000
    

    Sample Output

    1
    24
     
    处理大数的方法挺经典的,把别人代码贴出来以示膜拜
    view code
  • 相关阅读:
    重定向与转发比较
    servlet_5
    servlet_4
    servlet_3
    字符串的操作以及格式化的操作
    2019的Python
    函数2
    函数
    文件操作
    集合 set
  • 原文地址:https://www.cnblogs.com/zyx1314/p/3873888.html
Copyright © 2011-2022 走看看