小编Mic*_*ack的帖子

我该怎么做才能优化以下代码?

int FindingMoves(int input1) {
    int result = 0;
    int input2 = input1 + 1;

    result = (2 * input2 + 1) * (2 * input2 + 1);
    return result;
}
Run Code Online (Sandbox Code Playgroud)

我应该怎么做才能优化上述C程序,这必须被认为是有效的

我应该使用另一种编程语言来获得更好的结果吗?Java8,C++?

c

-5
推荐指数
1
解决办法
109
查看次数

标签 统计

c ×1