Created
June 21, 2020 03:23
-
-
Save Svastikkka/2356119334faffca9357364ba69c19ce to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| ## Read input as specified in the question. | |
| ## Print output as specified in the question. | |
| n=int(input()) | |
| sum=0 | |
| for i in range(1,n+1): | |
| if (sum+i)%2==0: | |
| sum=sum+i | |
| print(sum) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sum of Even Numbers till N