一段代码的完整账

👁️ 1 人浏览 💬 0 人评论 ❤️ 添加收藏

运行下面这段程序,填写它打印出来的结果。

STAGES = 5

def one_by_one(n):
    return n * STAGES

def pipelined(n):
    return n + STAGES - 1

n = 8
hazards = 2
stall = 2
wrong = 3
flush = 3
base = pipelined(n)
extra = hazards * stall + wrong * flush
print(str(base) + "/" + str(extra) + "/" + str(base + extra))
提交你的答案
请登录后提交答案。
去登录
代码编辑器
Ctrl + Enter 运行
本次输入:
输出:

                        
👩‍🏫
AI
💬 题目评论

全部评论