diff options
Diffstat (limited to '10954/addall.py')
| -rw-r--r-- | 10954/addall.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/10954/addall.py b/10954/addall.py new file mode 100644 index 0000000..bb45348 --- /dev/null +++ b/10954/addall.py @@ -0,0 +1,16 @@ +import sys + +while True: + line=sys.stdin.readline() + line=sys.stdin.readline() + lineint=[int(i) for i in line.rstrip().split(" ")] + curr_sum=lineint[0] + cost=0 + for x in range(1, len(lineint)): + curr_sum+=lineint[x] + cost+=curr_sum + print(cost) + print(curr_sum) + print(sorted(lineint)) + break + |
