diff options
Diffstat (limited to 'progs/a601.py')
-rw-r--r-- | progs/a601.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/progs/a601.py b/progs/a601.py new file mode 100644 index 0000000..e519c4b --- /dev/null +++ b/progs/a601.py @@ -0,0 +1,3 @@ +def number_of_substrings(str):
+ str_len = len(str);
+ return int(str_len * (str_len + 1) / 2);
\ No newline at end of file |