# 8.小明要繳稅(PythonDemo8) ###### tags: `PythonDemo` **分類:流程控制** **說明** 就這樣小明快樂工作了一年後,發現自己需要繳稅了 QQ。 但是小明不清楚自己的需要繳多少錢, 請你根據以下這個表來幫忙小明解決他稅務上的問題。 小明只知道自己的綜合所得淨額 N, 請幫他找出他的稅率J、稅金K、累進差額L、還有今年應納稅額M。 [綜合所得稅速算公式表](http://www.dot.gov.tw/dot/home.jsp?mserno=200912140005&serno=200912140018&menudata=DotMenu&contlink=ap/news_view.jsp&dataserno=201612120000) 已知 K=N*J。 M=K-L。 **Input Format** 輸入一個整數 N, 代表小明的綜合所得淨額。 **Output Format** 整數J% 整數K 整數L 整數M (每個輸出後包含一空白) --- ```python= N = int(input()) J = (5,12,20,30,40,45) L = (0,37800,134600,376600,829600,1345100) if 0<=N<=540000 : K=round(N*J[0]*0.01) M=K-L[0] print ('%d%%'%J[0],K,L[0],M,end=' ') elif 540001<=N<=1210000 : K=round(N*J[1]*0.01) M=K-L[1] print ('%d%%'%J[1],K,L[1],M,end=' ') elif 1210001<=N<=2420000 : K=round(N*J[2]*0.01) M=K-L[2] print ('%d%%'%J[2],K,L[2],M,end=' ') elif 2420001<=N<=4530000 : K=round(N*J[3]*0.01) M=K-L[3] print ('%d%%'%J[3],K,L[3],M,end=' ') elif 4530001<=N<=10310000 : K=round(N*J[4]*0.01) M=K-L[4] print ('%d%%'%J[4],K,L[4],M,end=' ') elif 10310001<=N : K=round(N*J[5]*0.01) M=K-L[5] print ('%d%%'%J[5],K,L[5],M,end=' ') ```