diff options
Diffstat (limited to 'progs/a16.py')
-rw-r--r-- | progs/a16.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/progs/a16.py b/progs/a16.py new file mode 100644 index 0000000..c458cce --- /dev/null +++ b/progs/a16.py @@ -0,0 +1,12 @@ +def min_Jumps(a, b, d):
+ temp = a
+ a = min(a, b)
+ b = max(temp, b)
+ if (d >= b):
+ return (d + b - 1) / b
+ if (d == 0):
+ return 0
+ if (d == a):
+ return 1
+ else:
+ return 2
\ No newline at end of file |