# 🌎MOD3(EX6-1)🌎 :::info 相信判斷一個數除以三的餘數是多少,對你來說應該沒有問題。 那,如果一次請你判斷很多個數呢嘿嘿?給你n個數字,請你輸出3k、3k+1、3k+2的數各有 幾個 ::: :::info 輸入說明: 第一行有一個正整數n,代表接下來有幾個數字,接著有n個介於1到50000之間的數字,請你 做判斷 ::: :::danger 輸出三個數字(以空白隔開),分別為n個數字中,三的倍數、三的倍數+1、三的倍數+2的數 量 ::: ``` python= total = int(input()) ... for i in range(total): num = int(input()) # 撰寫邏輯 ``` ## in1.txt :::warning 5 1 2 3 4 5 ::: ### output :::success 1 2 2 :::
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up