题意:给你 n 和 k ,让你求 n^k 的前三位和后三位 思路:后三位很简单,直接快速幂就好,重点在于如何求前三位,注意前导0 资料:求n^k的前m位 博客连接地址 代码: ...
分类:
其他好文 时间:
2017-04-04 21:35:56
阅读次数:
155
链表的数据对应位置相加,之和组成新的链表,已经说过是非负的值。 题目不难,注意链表的操作。 本人觉得平时练习有时间,即便题目说链表不为空,我们也应该判断一下,养成良好的习惯很重要。 说一下注意点: 1.主要考虑进位 2.注意可能链表不一样长 3.注意不要忘记了最高位的进位 这里用的是尾插法,可以考虑 ...
分类:
其他好文 时间:
2017-04-03 11:47:29
阅读次数:
183
题目链接 Problem Description MG is a rich boy. He has n apples, each has a value of V(0<=V<=9). A valid number does not contain a leading zero, and these ...
分类:
移动开发 时间:
2017-04-03 01:17:46
阅读次数:
357
415. Add Strings Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2. Note: java代码: ...
分类:
其他好文 时间:
2017-03-31 19:53:07
阅读次数:
159
self.orderCost.text = [NSStringstringWithFormat:@"%.1f元",self.order.cost.floatValue]; %.1f 表示小数点一位,%.2f 表示小数点2位,依次类推 格式定义The format specifiers support ...
分类:
移动开发 时间:
2017-03-29 17:28:04
阅读次数:
252
Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation. Note: The given inte ...
分类:
其他好文 时间:
2017-03-25 13:03:55
阅读次数:
130
转载:http://www.cnblogs.com/ihardcoder/p/5294927.html CSS3伪类和伪元素的特性和区别 前端er们大都或多或少地接触过CSS伪类和伪元素,比如最常见的:focus,:hover以及<a>标签的:link、visited等,伪元素较常见的比如:befo ...
分类:
Web程序 时间:
2017-03-09 10:45:58
阅读次数:
213
公司测试机环境不知道给我卸了什么包,导致yum运行报错状况: 报错情况: There was a problem importing one of the Python modulesrequired to run yum. The error leading to this problem was ...
分类:
其他好文 时间:
2017-02-27 13:44:28
阅读次数:
1656
Given a non-negative integer represented as a non-empty array of digits, plus one to the integer.You may assume the integer do not contain any leading... ...
分类:
其他好文 时间:
2017-02-23 23:54:30
阅读次数:
345
tar命令的-C参数 $ tar -cvf file2.tar /home/usr2/file2 tar: Removing leading '/' from members names home/usr2/file2 该命令可以将/home/usr2/file2文件打包到当前目录下的file2.t ...
分类:
系统相关 时间:
2017-02-15 12:10:00
阅读次数:
226