Skip to content

Instantly share code, notes, and snippets.

@simryang
Created August 12, 2020 00:54
Show Gist options
  • Save simryang/23b07dd53027e272acc1397e7417c6a3 to your computer and use it in GitHub Desktop.
Save simryang/23b07dd53027e272acc1397e7417c6a3 to your computer and use it in GitHub Desktop.
sum input in python
import sys
n=input()
a=[sys.stdin.readline() for i in range(n)]
print sum(list(map(int,a)))-n+1
# https://www.acmicpc.net/board/view/855
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment