【2020各互联网公司笔试小结】
1、【京东】编写一段程序,快速计算出2,3,5自由组合的由小到大的第n个数,也包括2,3,5。 运行结果:
代码:
//京东笔试,第n个2 c3 5组成的数
#include<iostream>
#include<vector>
using namespace std;
void fun(int &num, int temp,int n)
{
if (temp <= 0) return;
int sintece = n - temp;
if (temp ==
原创
2020-08-27 21:33:43 ·
211 阅读 ·
0 评论