1583 - Digit GeneratorFor a positive integer N , the digit-sum of N is defined as the sum of N itself and its digits. When M is the digitsum of N , we...
分类:
其他好文 时间:
2014-10-30 22:18:18
阅读次数:
234
Strange Way to Express IntegersDescriptionElina is reading a book written by Rujia Liu, which introduces a strange way to express non-negative integer...
分类:
其他好文 时间:
2014-10-30 20:47:17
阅读次数:
242
procedure?TFormMain.scrlbx1MouseActivate(Sender:?TObject;?Button:?TMouseButton;
??Shift:?TShiftState;?X,?Y,?HitTest:?Integer;
??var?MouseActivate:?TMouseActivate);
begin
??if?x+3...
分类:
其他好文 时间:
2014-10-30 15:40:48
阅读次数:
249
Find The Multiple
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 18527
Accepted: 7490
Special Judge
Description
Given a positive integer n, write a prog...
分类:
其他好文 时间:
2014-10-30 15:21:23
阅读次数:
245
create or replace function refresh_product_usage() returns void as $$declare rec record; sub_rec record; init_pro_id integer; parent_product_id integ....
分类:
数据库 时间:
2014-10-30 09:20:25
阅读次数:
275
Reverse digits of an integer.
Example1: x = 123, return 321
Example2: x = -123, return -321
简单模拟
class Solution {
public:
int reverse(int x) {
char s[1111];
sprintf(s,"%d",...
分类:
其他好文 时间:
2014-10-29 22:19:54
阅读次数:
211
JDK中关于Integer类的进制转换方法很精巧,具体实现如下:final static char[] digits = { '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' , 'a' , 'b' , ...
分类:
其他好文 时间:
2014-10-29 21:20:14
阅读次数:
150
ava不像C中拥有scanf这样功能强大的函数,大多是通过定义输入输出流对象。常用的类有BufferedReader,Scanner。实例程序:一,利用 Scanner 实现从键盘读入integer或float 型数据Java代码import java.util.*; public class t....
分类:
编程语言 时间:
2014-10-29 21:16:41
阅读次数:
167
题目很有简单:
Description
Given a n × n matrix A and a positive integer k, find the sum
S = A + A2 + A3 + … +
Ak.
Output
S mod m
范围:n (n ≤ 30), k (k ≤ 109) and
m (m 4).
显然,暴力是不能解决问题,这题目很有意思...
分类:
其他好文 时间:
2014-10-29 19:29:27
阅读次数:
176
Problem DescriptionCalculate S(n).S(n)=13+23+33+......+n3.InputEach line will contain one integer N(1 // 运用数学公式:13 +23 +33 +……+n3 =[n(n+1)/2]2 2 3...
分类:
其他好文 时间:
2014-10-29 18:29:40
阅读次数:
157