說真的 我不知道要怎麼打 但邏輯應該是有
ran = input()
for i in range(int(ran)):
pr = input().split()
a = int(pr[0])
b = int(pr[1])
if a % b == 0:
for i in range(b):
print("第",i+1,"位 : 拿",a//b,"元並說DD! BAD!", sep="")
else:
for i in range(b-1):
print("第",i+1,"位 : 拿",a//b,"元並說DD! BAD!", sep="")
print("第",i+2,"位 : 拿",a//b+a%b,"元並說DD! BAD!", sep="")
說真的 我不知道要怎麼打 但邏輯應該是有
ran = input()
for i in range(int(ran)):
pr = input().split()
a = int(pr[0])
b = int(pr[1])
if a % b == 0:
for i in range(b):
print("第",i+1,"位 : 拿",a//b,"元並說DD! BAD!", sep="")
else:
for i in range(b-1):
print("第",i+1,"位 : 拿",a//b,"元並說DD! BAD!", sep="")
print("第",i+2,"位 : 拿",a//b+a%b,"元並說DD! BAD!", sep="")
請輸出第幾筆