Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
68064 金浩 22计算算术表达式 Python3 Wrong Answer 34 MS 3796 KB 433 2024-03-18 20:31:44

Tests(0/2):


Code:

n=int(input()) for i in range(n): a, op, b = input().split() a, b = int(a), int(b) if op == "+": x = a + b print(x) elif op == "-": x = a - b print(x) elif op == "*": x = a * b print(x) elif op == "/": while b == 0: b = int(input()) x = int(a / b) print(x) elif op=="%": x=a%b print(x)


Run Info:

------Input------
5 5+4 3*7 8/3 9-9 12%2
------Answer-----
9 21 2 0 0
------Your output-----