This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 此两个题目由杭州-轨道友情提供 | |
有1、2、3、4个数字,能组成多少个互不相同且无重复数字的三位数?都是多少? | |
回答时注意加上下面这句话,才会有语法高亮或格式缩进。 | |
```javascript |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
输入三个整数x,y,z,请把这三个数由小到大输出。 | |
回答时注意加上下面这句话,才会有语法高亮或格式缩进。 | |
```javascript |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
打印出1-10000之间的所有对称数(如121,1331,2442)。 | |
回复时注意加上下面这句话,才会有语法高亮或格式缩进。 | |
```javascript |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
如何将阿拉伯数字每三位一逗号分隔,如:15000000转化为15,000,000。 | |
回复时注意加上下面这句话,才会有语法高亮或格式缩进。 | |
```javascript |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
由杭州-轨道友情提供,也可直接到[csdn答题](http://blog.csdn.net/chriswenwu/article/details/26354361): | |
求子数组的最大和 | |
一个整型数组,数组里有正数和负数。数组中连续的一个或多个整数组成一个子数组,每个子数组都有一个和,求所有子数组的和的最大值。 | |
回复时注意加上下面这句话,才会有语法高亮或格式缩进。 | |
```javascript |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
今天三题由杭州-轨道提供,他的blog:http://blog.csdn.net/chriswenwu/ | |
求s=a+aa+aaa+aaaa+aa...a的值,其中a是一个数字。例如2+22+222+2222+22222(此时共有5个数相加),几个数相加有用户控制。 | |
回复时注意加上下面这句话,才会有语法高亮或格式缩进。 | |
```javascript |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
输入数组,最大的与第一个元素交换,最小的与最后一个元素交换,其它位置的保持不变,最后输出数组。 | |
回复时注意加上下面这句话,才会有语法高亮或格式缩进。 | |
```javascript |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
求0—7所能组成的奇数个数,不允许重复。 | |
比如:1,3,5组成的奇数个数为: | |
1,13,31,15,51,35,53,135,531,513. | |
共10个 | |
回复时注意加上下面这句话,才会有语法高亮或格式缩进。 | |
```javascript |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
输入n个整数,输出其中最小的k个。 | |
例如输入1,2,3,4,5,6,7和8这8个数字,则最小的4个数字为1,2,3和4。 | |
PS: | |
1. 回复时注意加上下面这句话,才会有语法高亮或格式缩进。 | |
```javascript | |
// you code | |
``` | |
2. 粘贴代码时请使用shift+tab,缩进前面的空白。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
在一个字符串中找到第一个只出现一次的字符。如输入abaccdeff,则输出b。 | |
PS: | |
1. 回复时注意加上下面这句话,才会有语法高亮或格式缩进。 | |
```javascript | |
// you code | |
``` | |
2. 粘贴代码时请使用shift+tab,缩进前面的空白。 | |
3. 经测试,test方法轻松获胜。 |
OlderNewer