diff options
Diffstat (limited to 'progs/a229.py')
-rw-r--r-- | progs/a229.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/progs/a229.py b/progs/a229.py new file mode 100644 index 0000000..202324e --- /dev/null +++ b/progs/a229.py @@ -0,0 +1,4 @@ +import math
+def round_up(a, digits):
+ n = 10**-digits
+ return round(math.ceil(a / n) * n, digits)
\ No newline at end of file |