問題:
在一個(gè)計(jì)算機(jī)程序中,兩個(gè)各自有獨(dú)立指數(shù)的回圈分別產(chǎn)生 M 個(gè)和 N 個(gè)運(yùn)算.若這些回圈都是位於另一個(gè)有獨(dú)立指數(shù),并會(huì)產(chǎn)生 P 個(gè)運(yùn)算的回圈之內(nèi),請(qǐng)找出這三個(gè)回圈合共所代表的運(yùn)算總數(shù).
我的建議答案:
外回圈每運(yùn)算一次,在它里面的兩個(gè)回圈便會(huì)分別產(chǎn)生 M 個(gè)和 N 個(gè)運(yùn)算,亦即會(huì)產(chǎn)生 (M + N) 個(gè)運(yùn)算.所以,當(dāng)外回圈運(yùn)算 P 次之後,兩個(gè)內(nèi)回圈便會(huì)合共產(chǎn)生 P * (M + N) 個(gè)運(yùn)算.再加上外回圈自己的 P 個(gè)運(yùn)算,三個(gè)回圈合共代表的運(yùn)算總數(shù)便等於:
P * (M + N) + P = P * (M + N + 1)
所以答案應(yīng)該是:P * (M + N + 1)
英語翻譯
英語翻譯
In a computer program,separate loops with distinct indices produce M and N
operations,respectively.If these reside internally in a loop with an independent index
producing P operations,find the total number of operations represented by the three loops.
In a computer program,separate loops with distinct indices produce M and N
operations,respectively.If these reside internally in a loop with an independent index
producing P operations,find the total number of operations represented by the three loops.
其他人氣:631 ℃時(shí)間:2020-03-29 06:56:41
優(yōu)質(zhì)解答
我來回答
類似推薦
猜你喜歡
- 1小學(xué)英語題…灰色減黑色為什么等于白色求大神幫助
- 2關(guān)于電路中的電容器
- 3有21朵蘭花,蘭花比紅花少30%,紅花有多少朵?要算式
- 4My father goes to work by car改為特殊疑問句
- 5怎樣計(jì)算電子轉(zhuǎn)移的摩爾數(shù)
- 6急求:49克H2SO4的物質(zhì)的量是多少?1.5摩爾硫化氫的質(zhì)量是多少,其中含多少摩爾氫?
- 7化簡xy/[(100-x)*8]=3/20
- 8填空題:折線統(tǒng)計(jì)圖不僅可以反映數(shù)量的______________,而且能清楚地表示出數(shù)量的__________________.
- 9eight中是字母組合ei發(fā)[ei]還是eigh發(fā)[ei]音?
- 10雷鋒精神是否過時(shí) 辯論賽
- 11( )映照
- 12南亞黃麻產(chǎn)區(qū)的地形特征