Created
January 28, 2015 02:49
-
-
Save junichiro/36e955441be36b5abd28 to your computer and use it in GitHub Desktop.
code_iq: 1208
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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