码迷,mamicode.com
首页 >  
搜索关键字:digit recongnizer    ( 1477个结果
LeetCode-004 Add Two Numbers
【题目】 You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list. Input: (2 -> 4 -> 3) + (5 -> 6 -> 4) Out...
分类:其他好文   时间:2014-05-15 05:13:49    阅读次数:306
【LeetCode】Plus One
题目 Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most significant digit is at the head of the list. 解答 本题考察进位问题,注...
分类:其他好文   时间:2014-05-15 04:16:56    阅读次数:245
LeetCode --- Plus One
题目链接题意:给出一个以数组形式表示的数, 求该数加1后的结果,同样以数组形式返回。附上代码: 1 class Solution { 2 public: 3 vector plusOne(vector &digits) { 4 unsigned int len = digit...
分类:其他好文   时间:2014-05-12 12:49:34    阅读次数:268
1061 快速幂取模
HDU 1061 Rightmost Digit分类: ACM 算法 2011-12-17 17:37 749人阅读 评论(2) 收藏 举报integeroutputinputeach算法c Problem DescriptionGiven a positive integer N, you sh....
分类:其他好文   时间:2014-05-09 10:20:14    阅读次数:243
Last non-zero Digit in N!(阶乘最后非0位)
Last non-zero Digit in N!Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 5861 Accepted Submissio...
分类:其他好文   时间:2014-05-09 04:13:09    阅读次数:360
HDU 1061 Rightmost Digit
题目链接题意 : 求n的n次方的个位数是多少。思路 : 自己写一下看一下规律,会发现0,1,5,6的个位数怎么乘都是原来这个数,剩下的数也还是有规律。 1 #include 2 #include 3 #include 4 5 using namespace std ; 6 7 int a[...
分类:Web程序   时间:2014-05-09 03:13:46    阅读次数:341
1833: [ZJOI2010]count 数字计数 - BZOJ
Description给定两个正整数a和b,求在[a,b]中的所有整数中,每个数码(digit)各出现了多少次。Input输入文件中仅包含一行两个整数a、b,含义如上所述。Output输出文件中包含一行10个整数,分别表示0-9在[a,b]中出现了多少次。Sample Input1 99Sample...
分类:其他好文   时间:2014-05-08 13:14:39    阅读次数:346
ProjectEuler_P13
Problem:Work out the first ten digits of the sum of the following one-hundred 50-digit numbers.3710728753390210279879799822083759024651013574025046376...
分类:其他好文   时间:2014-05-07 13:34:38    阅读次数:299
Last non-zero Digit in N!
Problem DescriptionThe expression N!, read as "N factorial," denotes the product of the first N positive integers, where N is nonnegative. So, for exa...
分类:其他好文   时间:2014-05-07 00:11:55    阅读次数:353
算法竞赛_入门经典_刘汝佳__(2)
1,有几位数字 #include int main_2_1_digit(){ int n; while(scanf("%d",&n)){ int count = 0; if(n==0) count = 1; while(n){ count++; n/=10; } printf("%d\n",count); } return 0; } ...
分类:其他好文   时间:2014-05-06 21:20:19    阅读次数:374
1477条   上一页 1 ... 145 146 147 148 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!