Skip to content

Instantly share code, notes, and snippets.

@yuyueugene84
Created November 9, 2022 02:27
Show Gist options
  • Save yuyueugene84/feaf910b85f3367a0cb90bce0d787cd0 to your computer and use it in GitHub Desktop.
Save yuyueugene84/feaf910b85f3367a0cb90bce0d787cd0 to your computer and use it in GitHub Desktop.
start = int(input("請輸入起點:"))
end = int(input("請輸入結束點:"))
total = (start + end) * (end - start + 1) / 2
print(total)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment