Skip to content

Instantly share code, notes, and snippets.

@monhime
Last active April 13, 2020 03:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save monhime/ff9b2d1fadd19444c207466fedebc80f to your computer and use it in GitHub Desktop.
Save monhime/ff9b2d1fadd19444c207466fedebc80f to your computer and use it in GitHub Desktop.
ABC162 B問題 解答
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
n=int(input())
sum=0
for i in range(1,n+1):
if i%3!=0 and i%5!=0:sum+=i
print(sum)
if __name__=='__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment