NSTimerA timer provides a way to perform a delayed action or a periodic action. The timer waits until a certain time interval has elapsed and then fires, sending a specified message to a specified obje...
分类:
移动开发 时间:
2015-08-29 23:20:37
阅读次数:
281
Given a non-negative integernum, repeatedly add all its digits until the result has only one digit.For example:Givennum = 38, the process is like:3 + ...
分类:
其他好文 时间:
2015-08-27 09:32:30
阅读次数:
123
1、题目名称 Add Digits (非负整数各位相加) 2、题目地址 https://leetcode.com/problems/add-digits 3、题目内容 英文:Given a non-negative integer num, repeatedly add all its digits until the result ...
分类:
其他好文 时间:
2015-08-27 00:52:11
阅读次数:
217
题目链接:https://leetcode.com/problems/add-digits/
题目:
Given a non-negative integer num, repeatedly add all its digits until the
result has only one digit.
For example:
Given num = 38, the pro...
分类:
其他好文 时间:
2015-08-25 23:53:39
阅读次数:
174
whileCONDITION;do【条件满足就循环,不满足就退出循环】STAMENTdoneuntilCONDITION;do【条件不满足就循环,满足就退出循环】STAMENTdonefor循环还可以这么玩!!!(计算100以内所有正整数的和)for((I=1I<=100I++));doletsum+=$Idone脚本:通过ping命令测试从192.168.9.1..
分类:
其他好文 时间:
2015-08-25 17:05:04
阅读次数:
150
Given a non-negative integernum, repeatedly add all its digits until the result has only one digit.For example:Givennum = 38, the process is like:3 + ...
分类:
编程语言 时间:
2015-08-25 16:31:53
阅读次数:
153
Given a non-negative integer num, repeatedly add all its digits until the result has only
one digit.
For example:
Given num = 38, the process is like: 3
+ 8 = 11, 1 + 1 = 2. Since 2 has
on...
分类:
其他好文 时间:
2015-08-21 15:37:26
阅读次数:
147
Description:Given a non-negative integernum, repeatedly add all its digits until the result has only one digit.For example:Givennum = 38, the process ...
分类:
其他好文 时间:
2015-08-20 22:31:12
阅读次数:
241
3 数组相关操作
3.1 编写一段代码,将a设置为一个n个随机整数的数组,要求随机数介于0(包含)和n(不包含)之间
random和yield的使用
Scala代码
import scala.math.random
def randomArray(n:Int)={
for(i 0 until n) yield (random * n)....
分类:
编程语言 时间:
2015-08-20 01:28:18
阅读次数:
581
Given a non-negative integernum, repeatedly add all its digits until the result has only one digit.For example:Givennum = 38, the process is like:3 + ...
分类:
其他好文 时间:
2015-08-19 19:36:09
阅读次数:
115