/ JMU / 题库 /

power_mod

power_mod

测试数据来自 XMU_ACM/5addd65ed3d8a103c03dab94

Description

输入x n
输出x的n次方对1000000007取模的结果

Format

Input

第一行一个正整数T表示数据组数(T<=100000)
接下来T行每行两个整数x n(x<=100000 n<=100000)

Output

一个正整数即答案

Sample 1

Input

2
3 3
3 4

Output

27
81

Limitation

1s, 128Mb for each test case.

Hint

Free Pascal Code

var a,b:longint;
begin
    readln(a,b);
    writeln(a+b);
end.

C Code

#include <stdio.h>
int main(void)
{
    int a, b;
    scanf("%d%d", &a, &b);
    printf("%d\n", a + b);
    return 0;
}

C++ Code

#include <iostream>
using namespace std;
int main()
{
    int a, b;
    cin >> a >> b;
    cout << a + b << endl;
    return 0;
}

Python Code

a, b = [int(i) for i in raw_input().split()]
print(a + b)

Java Code

import java.io.*;
import java.util.Scanner;

public class Main {

    /**
     * @param args
     * @throws IOException 
     */
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        System.out.println(a + b);
    }
}

Source

Vijos Original

信息

ID
1002
难度
9
分类
(无)
标签
(无)
递交数
2
已通过
1
通过率
50%
上传者