aboutsummaryrefslogtreecommitdiff
path: root/codechef/jogging/main.py
diff options
context:
space:
mode:
authoromagdy7 <omar.professional8777@gmail.com>2022-06-29 15:57:29 +0200
committeromagdy7 <omar.professional8777@gmail.com>2022-06-29 15:57:29 +0200
commit1b8f7c9d4eb8b767d32dbbbfd96662b73c037627 (patch)
tree7f984139dcca441d7ab582e0c67daa125e400a14 /codechef/jogging/main.py
parent7860cb994fbf6af63865eb6dc9045bbc8abd61a4 (diff)
downloadcompetitive-programming-1b8f7c9d4eb8b767d32dbbbfd96662b73c037627.tar.xz
competitive-programming-1b8f7c9d4eb8b767d32dbbbfd96662b73c037627.zip
Solved some problem from codechef and codeforces
Diffstat (limited to 'codechef/jogging/main.py')
-rw-r--r--codechef/jogging/main.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/codechef/jogging/main.py b/codechef/jogging/main.py
new file mode 100644
index 0000000..d6982e8
--- /dev/null
+++ b/codechef/jogging/main.py
@@ -0,0 +1,11 @@
+t = int(input())
+
+for i in range(t):
+ n, x = input().split()
+ n = int(n)
+ x = int(x)
+ if n != 1:
+ print(((x * 2) ** (n - 1)) % 1000000007)
+ else:
+ print(x)
+