码迷,mamicode.com
首页 >  
搜索关键字:ugly number    ( 27156个结果
487-3279
Problem Description Businesses like to have memorable telephone numbers. One way to make a telephone number memorable is to have it spell a memorable word or phrase. For example, you can call the U...
分类:其他好文   时间:2014-08-16 16:28:10    阅读次数:185
数论 Number Transformation HDU4952
已知n,k,操作k次,每次操作求大于n且能被次数i整除的最小的数 已知x*i,所以(i+1)*y>=x*i,y>=x-[x/(i+1)],当x #include int main() { long long n,k; long long i; int time=0; while(scanf("%I64d%I64d",&n,&k)!=-1) { ...
分类:其他好文   时间:2014-08-16 15:07:40    阅读次数:162
LeetCode——Gray Code
The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total number of bits in the code, print the sequence of ...
分类:其他好文   时间:2014-08-16 12:37:20    阅读次数:219
Distinct Subsequences
Given a string S and a string T, count the number of distinct subsequences of T in S.A subsequence of a string is a new string which is formed from th...
分类:其他好文   时间:2014-08-16 12:23:50    阅读次数:221
找新朋友(杭电1286)
/*找新朋友 Problem Description 新年快到了,“猪头帮协会”准备搞一个聚会,已经知道现有会员N人,把会员从1到N编号,其中会长的号码是N号,凡是和会长是老朋友的,那么该会员的号码肯定和N有大于1的公约数,否则都是新朋友,现在会长想知道究竟有几个新朋友?请你编程序帮会长计算出来。   Input 第一行是测试数据的组数CN(Case number,1   Outpu...
分类:其他好文   时间:2014-08-16 11:14:10    阅读次数:243
[leetcode]Sum Root to Leaf Numbers
Sum Root to Leaf NumbersGiven a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-l...
分类:其他好文   时间:2014-08-16 00:59:09    阅读次数:197
GameLoft笔试题目 [Online Network Programmer Test]
gameloft 笔试题目是英文的,前面全部是理论的,最后两道是编程题目。12345最后两道编程题目 其实还算简单:#include #include #include std::string itoa(int number){ char nstr[15]; sprintf(nstr,"%d",nu...
分类:Web程序   时间:2014-08-15 21:06:29    阅读次数:266
POJ 2689 二次筛选(映射)
Prime DistanceTime Limit:1000MSMemory Limit:65536KTotal Submissions:12303Accepted:3296DescriptionThe branch of mathematics called number theory is abo...
分类:其他好文   时间:2014-08-15 21:04:19    阅读次数:327
3Sum Closest
Given an arraySofnintegers, find three integers inSsuch that the sum is closest to a given number, target. Return the sum of the three integers. You m...
分类:其他好文   时间:2014-08-15 20:53:19    阅读次数:240
HDU 1394 Minimum Inversion Number ( 树状数组求逆序数 )
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1394 Minimum Inversion Number Time Limit: 2000/1000 MS (Java/Others)Memory Limi...
分类:其他好文   时间:2014-08-15 20:49:39    阅读次数:227
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!