Skip to content

Instantly share code, notes, and snippets.

@junichiro
Created January 28, 2015 02:49
Show Gist options
  • Save junichiro/36e955441be36b5abd28 to your computer and use it in GitHub Desktop.
Save junichiro/36e955441be36b5abd28 to your computer and use it in GitHub Desktop.
code_iq: 1208
# -*- coding: utf-8 -*-
import sys
class code_iq:
prime_numbers = []
def do(self, a, x):
if a == 0 and x == 0:
pass
elif a == 0:
return 0
elif x == 0:
return 1
else:
res = 1
for v in range(1, x + 1):
res = res * a
res = res % 100000000
return res
if __name__ == '__main__':
code = code_iq()
f = open(sys.argv[1])
line = f.readline()
while line:
s = line.split(" ")
print code.do(int(s[0]), int(s[1]))
line = f.readline()
f.close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment