乘以7 [英] multiplication by 7
本文介绍了乘以7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
快速将数字乘以7
give a fast way to multiply a number by 7
推荐答案
sudharsan写道:
sudharsan wrote:
give快速将数字乘以7
give a fast way to multiply a number by 7
int n = 1;
n * = 7; //在我的系统上只有几个时钟!
-
==============
*不是学究者*
==============
int n = 1;
n *= 7; // Just a few clocks on my system!
--
==============
*Not a pedant*
==============
sudharsan写道:
sudharsan wrote:
给出一个快速的方法将数字乘以7
give a fast way to multiply a number by 7
想一想:
>
x * 7 = x *(4 + 2 + 1)
这与C有什么关系?
-
BR,Vladimir
Think along the lines of:
x*7 = x*(4+2+1)
How is this related to C?
--
BR, Vladimir
Vladimir S. Oka写道:
Vladimir S. Oka wrote:
sudharsan写道:
sudharsan wrote:
快速将数字乘以7
按以下方式思考:
x * 7 = x *(4 + 2 + 1)
这与C有什么关系?
Think along the lines of:
x*7 = x*(4+2+1)
How is this related to C?
大多数C编译器都知道生成的代码之间的合理折衷
目标架构的大小和速度。
Most C compilers know a reasonable compromise between generated code
size and speed for their target architecture.
这篇关于乘以7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文