Skip to content

Instantly share code, notes, and snippets.

@codyhex
Last active October 10, 2017 22:42
Show Gist options
  • Save codyhex/32729422e44d30cefadbe3d14d7391d8 to your computer and use it in GitHub Desktop.
Save codyhex/32729422e44d30cefadbe3d14d7391d8 to your computer and use it in GitHub Desktop.
To get the sum of a line input with the input length.
# Sample Input
# ( you dont need the count number for python)
# 1 2 3 4 10 11
number_of_elements = int(raw_input())
array = map(int, raw_input().split())
print sum(array)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment