diff options
Diffstat (limited to 'progs/a918.py')
-rw-r--r-- | progs/a918.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/progs/a918.py b/progs/a918.py new file mode 100644 index 0000000..642d76d --- /dev/null +++ b/progs/a918.py @@ -0,0 +1,4 @@ +def difference(n) :
+ S = (n*(n + 1))//2;
+ res = S*(S-1);
+ return res;
\ No newline at end of file |