did stuff
This commit is contained in:
parent
6bed97c143
commit
f25d961f9c
3 changed files with 18 additions and 1 deletions
2
hello.c
2
hello.c
|
@ -2,5 +2,5 @@
|
|||
// vim: set ts=4 sw=4 tw=80 et:
|
||||
|
||||
int main() {
|
||||
printf("Hello\n");
|
||||
printf("Hello World!\n");
|
||||
}
|
||||
|
|
16
modular_exponentiation.py
Normal file
16
modular_exponentiation.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
import math
|
||||
import sys
|
||||
|
||||
def mod_exp(x, y, m):
|
||||
k = x % m
|
||||
for i in range(y):
|
||||
print(i)
|
||||
k = (k * x) % m
|
||||
return k
|
||||
|
||||
line = sys.stdin.readline().split()
|
||||
x = int(line[0])
|
||||
y = int(line[1])
|
||||
m = int(line[2])
|
||||
|
||||
print(mod_exp(x, y, m))
|
1
modulat.txt
Normal file
1
modulat.txt
Normal file
|
@ -0,0 +1 @@
|
|||
457327 129852986013369 53279108
|
Reference in a new issue