Skip to content

Instantly share code, notes, and snippets.

@monhime monhime/ABC162B.gyp
Last active Apr 13, 2020

Embed
What would you like to do?
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
You can’t perform that action at this time.