Advertisement
fahimkamal63

Akaash's Assignment

Jun 1st, 2019
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.19 KB | None | 0 0
  1. #include<iostream>
  2. #include<cmath>
  3. using namespace std;
  4.  
  5. int main(){
  6.     int t; cin >> t;
  7.     while(t--){
  8.         int n, k; cin >> n >> k;
  9.         cout << (pow(n+1,k) - pow(n,k)) << endl;
  10.     }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement