CF893E.Counting Arrays

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

You are given two positive integer numbers xx and yy . An array FF is called an yy -factorization of xx iff the following conditions are met:

  • There are yy elements in FF , and all of them are integer numbers;
  • .

You have to count the number of pairwise distinct arrays that are yy -factorizations of xx . Two arrays AA and BB are considered different iff there exists at least one index ii ( 1<=i<=y1<=i<=y ) such that AiBiA_{i}≠B_{i} . Since the answer can be very large, print it modulo 109+710^{9}+7 .

输入格式

The first line contains one integer qq ( 1<=q<=1051<=q<=10^{5} ) — the number of testcases to solve.

Then qq lines follow, each containing two integers xix_{i} and yiy_{i} ( 1<=xi,yi<=1061<=x_{i},y_{i}<=10^{6} ). Each of these lines represents a testcase.

输出格式

Print qq integers. ii -th integer has to be equal to the number of yiy_{i} -factorizations of xix_{i} modulo 109+710^{9}+7 .

输入输出样例

  • 输入#1

    2
    6 3
    4 2
    

    输出#1

    36
    6
    

说明/提示

In the second testcase of the example there are six yy -factorizations:

  • 4,1{-4,-1} ;
  • 2,2{-2,-2} ;
  • 1,4{-1,-4} ;
  • 1,4{1,4} ;
  • 2,2{2,2} ;
  • 4,1{4,1} .
首页