Created
November 9, 2022 02:27
-
-
Save yuyueugene84/feaf910b85f3367a0cb90bce0d787cd0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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