117. Counting time limit per test: 0.5 sec. Find amount of numbers for given sequence of integer numbers such that after raising them to the M-th power they will be divided by K. Input Input consists of two lines. There are three integer numbers N, M, K (0<N, M, K<10001) on the first line. There are N positive integer numbers − given sequence (each number is not more than 10001) − on the second line. Output Write answer for given task. Sample Input 4 2 50 9 10 11 12 Sample Output 1
题目是说,样例的第一行为三个数n,m,k;然后第二行有n个数,求第二行中,每个数的m次方能被k整除的个数。——快速幂
|
|
SGU117—Counting (快速幂取模)
最新推荐文章于 2018-03-19 00:30:01 发布