diff options
Diffstat (limited to 'progs/a361.py')
-rw-r--r-- | progs/a361.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/progs/a361.py b/progs/a361.py new file mode 100644 index 0000000..e15b5df --- /dev/null +++ b/progs/a361.py @@ -0,0 +1,5 @@ +def sum_Natural(n):
+ sum = (n * (n + 1))
+ return int(sum)
+def sum_Even(l,r):
+ return (sum_Natural(int(r / 2)) - sum_Natural(int((l - 1) / 2)))
\ No newline at end of file |