我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

PowMod

Problem Description
Declare:
k=∑mi=1φ(i∗n) mod 1000000007

n is a square-free number.

φ is the Euler's totient function.

find:
ans=kkkk...k mod p

There are infinite number of k

Input
Multiple test cases(test cases ≤100), one line per case.

Each line contains three integers, n,m and p.

1≤n,m,p≤107

Output
For each case, output a single line with one integer, ans.

Sample Input
1 2 6
1 100 9

Sample Output
4
7

http://blog.csdn.net/mengxiang000000/article/details/53574583

近期文章

  • jQuery Moible图标问题
  • Golden Eggs
  • Cat VS Dog
  • 两个问题。图像处理C++编程
  • lucene问题 一个小程序报错
  • Counting Grids
  • codeblocks cannot open output file
  • X Property
  • Prime Friend
  • 数据结构小白求助大神们,为什么程序在输入完一个数据后总报错?
  • chromium代码下载问题
  • Dragon Ball
  • 设置android界面垂直显示
  • D3做一个地图,经纬度显示了监测站点,鼠标到检测点上显示检测点数据
  • To My Girlfriend
  • Hearthstone
  • 使用百度云主机建站过程中域名解析不上,求大神解答
  • tcp转发https失败 fatel alert:protocol version
  • 一个简单的问题,大佬们知道的告诉一下
  • javaweb程序的web.xml这个地方报错,如何解决?请大神指点

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华