m,n=[int(s) for s in input("輸入m、n的值:").split() ] tot=0 for i in range(m,n+1): if i%3==0: tot+=i print(tot)
輸入:1 10
運行結果:
輸入m、n的值:1 10 3 9 18 Process finished with exit code 0
Project IntroductionWith the
p{margin:10px 0}.markdown-body
Originally came with python2.7
First of all :python What is i
前些天發現了一個巨牛的人工智能學習電子書,通俗易懂,風趣幽默
簡 介: 本文給出了 MicroPython內核開發筆記:書