码迷,mamicode.com
首页 >  
搜索关键字:digits    ( 2164个结果
Plus One
Plus OneGiven a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant dig...
分类:其他好文   时间:2014-11-10 21:45:39    阅读次数:191
C++ BigInteger 大整数类模板(转)
#include #include #include #include #include using namespace std;class DividedByZeroException {};class BigInteger{ private: vector digits; ...
分类:编程语言   时间:2014-11-10 17:29:23    阅读次数:295
第一轮 I
K-based Numbers Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Description Let’s consider K-based numbers, containing exactly N digits. We define a nu...
分类:其他好文   时间:2014-11-10 10:05:32    阅读次数:158
leetcode Plus One
题目:对一个用vector存的数字进行加1,然后返回加1后的值。一次就在oj上通过了。就是进位加上当前位如果大于9,那就当前位等于0;随后进位还为1的话就是在数组前面插入一个1;class Solution {public: vector plusOne(vector &digits) ...
分类:其他好文   时间:2014-11-10 01:07:46    阅读次数:227
Sum Root to Leaf Numbers
Sum Root to Leaf Numbers  Total Accepted: 26533 Total Submissions: 89186My Submissions Question  Solution  Given a binary tree containing digits from 0-9 only, each root-to-leaf pa...
分类:其他好文   时间:2014-11-09 23:53:10    阅读次数:244
Reverse Integer
Reverse IntegerReverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321 1 public class Solution { 2 public int reve...
分类:其他好文   时间:2014-11-09 22:04:55    阅读次数:172
POJ2718 Smallest Difference 【贪心+枚举】
Smallest Difference Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 4639   Accepted: 1290 Description Given a number of distinct decimal digits, you can fo...
分类:其他好文   时间:2014-11-08 16:44:18    阅读次数:284
转:Oracle中的日期和字符串互相转换
TO_DATE格式(以时间:2007-11-0213:45:25为例)Year:yy two digits 两位年显示值:07yyy three digits 三位年显示值:007yyyy four digits 四位年显示值:2007Month:mmnumber两位月显示值:11monabbrev...
分类:数据库   时间:2014-11-08 13:28:57    阅读次数:382
leetcode 7. Reverse Integer
Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321需要考虑:如果给出数据的逆置溢出,如何处理? 1 int reverse(int x) 2 { 3 ...
分类:其他好文   时间:2014-11-08 11:39:54    阅读次数:162
限制EditText输入框的内容
在layout中配置信息android:digits="1234567890.+-*/%\n()"限制输入框中只能输入自己定义的这些字符串 如果输入其它将不予以显示android:phoneNumber="true"限制输入框中只能输入手机号码android:password="true"限制输入框...
分类:其他好文   时间:2014-11-08 00:42:29    阅读次数:235
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!