Description描述Find amount of numbers for given sequence of integer numbers such that after raising them to theM-th power they will be divided byK.求出给定一...
分类:
其他好文 时间:
2015-02-24 15:02:35
阅读次数:
149
Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.对于这道题,要把罗马数字中的几个特殊的数字保存到一张表中,如,4,5,9,10等,然后开...
分类:
其他好文 时间:
2015-02-24 13:47:56
阅读次数:
155
Volodya is an odd boy and his taste is strange as well. It seems to him that a positive integer number is beautiful if and only if it is divisible by each of its nonzero digits. We will not argue with...
分类:
其他好文 时间:
2015-02-23 23:41:09
阅读次数:
314
Counting Sort1. Counting Sort doesn't work for negative number.2. Counting Sort assumes that each element is SMALL INTEGER.3. Time Complexity is O(Max...
分类:
其他好文 时间:
2015-02-23 16:40:52
阅读次数:
118
Given an integer array, adjust each integers so that the difference of every adjcent integers are not greater than a given number target.If the array ...
分类:
其他好文 时间:
2015-02-23 15:26:38
阅读次数:
115
http://acm.hdu.edu.cn/showproblem.php?pid=3709
Problem Description
A balanced number is a non-negative integer that can be balanced if a pivot is placed at some digit. More specifically, imagi...
分类:
其他好文 时间:
2015-02-22 23:06:28
阅读次数:
194
Problem Description
A wqb-number, or B-number for short, is a non-negative integer whose decimal form contains the sub- string “13” and can be divided by 13. For example, 130 and 2613 are wqb-numbers,...
分类:
其他好文 时间:
2015-02-22 15:49:05
阅读次数:
166
【题意】:输入一个符号(加减乘除) 后边跟上两个操作数。输出结果,如果不是整数,保留两位小数。注意:The result should be rounded to 2 decimal places
If and only if it is not an integer.需要判断是不是整数,不是全部保留两位小数。
可以对整个字符串分割,或者采用一个char加两个int的输入。
【AC代码】:
...
分类:
其他好文 时间:
2015-02-22 12:17:16
阅读次数:
169
Given a sequence of positive integers and another positive integer p. The sequence is said to be a "perfect sequence" if M 2 #include 3 #include 4 ...
分类:
其他好文 时间:
2015-02-22 12:11:53
阅读次数:
146
Problem Description
The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then that digit is the digital root. If the resultin...
分类:
其他好文 时间:
2015-02-22 11:07:30
阅读次数:
116