# 🌎 新手訓練 for + if(EX6-8)🌎 :::info 內容就是 希望學到for迴圈和剛開始coding的學弟好好加油!!!! ::: :::info 輸入說明: 第一行有一個正整N,代表接下來有N行每行有三個正整數a , b , c ( 1 ≤ b , c ≤ 2147483647 ) ( 1 ≤ a ≤ 4 ) ::: ``` python= t = int(input()) for i in range(t): n = input().split() # 撰寫邏輯 `````` :::danger 輸出說明: 如果a = 1 ,請輸出b+c 如果a = 2 ,請輸出b-c 如果a = 3 ,請輸出b*c 如果a = 4 ,請輸出b/c (輸出的值無條件捨棄小數點,可用int) ::: ## in1.txt :::warning 4 1 2 3 2 2 3 3 2 3 4 2 3 ::: ### output :::success 5 -1 6 0 :::
×
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