You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
363 B
10 lines
363 B
#!/bin/python
|
|
|
|
perchit = float(input("PERCENT HIT? "))
|
|
percw = float(input("PERCENT WRITE? "))
|
|
cacher = int(input("CACHE READ TIME? "))
|
|
cachew = int(input("CACHE WRITE TIME? "))
|
|
memr = int(input("MEM READ TIME? "))
|
|
memw = int(input("MEM WRITE TIME? "))
|
|
|
|
print(perchit*percw*cachew + perchit*(1-percw)*cacher + (1-perchit)*percw*memw + (1-perchit)*(1-percw)*memr)
|
|
|